4
$\begingroup$

I have been going through old StackExchange threads to see how to potentially use Mathematica's built-in connection/authentication to the Twitter API to connect to it manually, and access some additional Twitter data-mining functionalities through the Twitter API that are not included in Mathematica's built-in Twitter functions.

My specific problem currently is that when I use the "Followers" request within the standard "Twitter" ServiceConnect function, I am only able to pull down the most recent 5,000 followers that a specified Twitter user has (I know that this is a universal limitation with this built-in Mathematica function). However, I also know that by using the JSON commands associated with "Cursoring" (a functionality described here, on the Twitter Developers page), it is possible to get a list of all followers following a specific user on Twitter. While I know that this can be done with relative ease in other programming languages, I wanted to see if it could be done in the Wolfram Language, using Mathematica's built-in Twitter API connection/authentication data. Staying in Mathematica to do this would be my strong preference.

Using Service Connect, I was able to extract the following authentication data:

tw = ServiceConnect["Twitter", "New"];
ServiceConnections`Private`serviceAuthentication[tw[[-1, -1]]][[2]]

Which produced the output:

OAuthSigning`Private`Token10["3402037804-\ 
6zu9Enw0jAT39nfy0EhuDFFoBIozgDWJlYzm2FV", \
"tU0N0erWWpMZdLt8XnqoChhwY7qXKVcej4LLEzFT2ClXm"]

However, I have tried to use this authentication data in a variety of different ways (many of which I have taken from past threads on StackExchange), but none of them seem to work anymore (perhaps there is a new way to do this in version 11.3)?

I just assume that there must be a solution for using Twitter API cursoring directly through the Wolfram Language, and I would like to check here before I move to another programming language to get this done (in which case, I would then likely import the results to Mathematica for analysis).

Any help here would be greatly appreciated!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.