To reuse NodeXL's Twitter network importers in another application:
-
Download the NodeXL source code.
-
Open NodeXL.sln in Visual Studio 2008 or 2010. If you are using Visual Studio 2010, let Visual Studio convert the solution.
-
In Solution Explorer, delete all projects except GraphDataProviders, ExcelTemplatePlugins, and Util.
-
Modify TwitterAccessToken.GetAccessTokenFilePath() to fit your application's needs. NodeXL stores Twitter's access token in a file so the user doesn't have to reauthorize with Twitter every time she imports a network.
-
Build the solution. The assembly you need will be at NodeXL\GraphDataProviders\bin\Debug\Smrf.NodeXL.GraphDataProviders.dll. Add a reference to this assembly to your own application.
-
In your application, create a TwitterSearchNetworkGraphDataProvider object, then call its TryGetGraphDataAsTemporaryFile(out String pathToTemporaryFile) method. That method opens a dialog for specifying what to include in the network, gets the network from Twitter, and stores the results in a GraphML file.