hei,
I’m trying to fetch tweets with a certain hashtag. I ran into the ofxTwitterstream addon but when trying to run the example I am confused what’s going wrong. I used a couple of very common hashtags but it doesn’t return anything. I’m not even sure if the login is successful or anything.
can anyone help?
I’ve actually started trying this before I posted the question but I cannot get the search example to work either.
is there a way to check if twitterClient.authorize(CONSUMER_KEY, CONSUMER_SECRET); is successful or not? the search example loads from cached file (twitterClient.loadCacheFile();) but not even the simple search // Simple Query. You can find tweets containing that word. ofxTwitterSearch search; search.query = "cat"; twitterClient.startSearch(search);
It works fine for me. Are you sure that you put the right keys? if the app is authorized a new browser page will open and you will redirect to the twitter server asked to authorize your application. After that it will stored in bin/data folder a credentials.xml file for the next use of your app. I think you can query if the app is auhorized with
I entered a new app into dev.twitter.com and copypasted the codes. however, for me the openframeworks app doesn’t open a browser page which redirects to twitter… is that what you meant should happen?
here are my error messages logged to the console:
[notice ] ofxTwitter::authorize: Authorizing app...
[notice ] ofxOAuth::loadCredentials: Unable to locate credentials file: ../../../data/credentials.xml
[ error ] ofxTwitter::updateHelpConfiguration: App not authorized.
0ERROR: \266\310
[warning] ofxOAuth::obtainRequestToken: Return parameter did not have 2 values: <?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token?</request>
</hash>
- skipping.
[warning] ofxOAuth::obtainRequestToken: Request token secret not returned.
[warning] ofxOAuth::obtainRequestToken: Request token not returned.
[ error ] ofxOAuth::update: Access failed.
i had a similar issue before see here but no remember well what was the reason (maybe the wrong keys or i missed to put some files in /data folder) do you create the app from scratch or are you testing the example?
indeed. the data folder is missing that credentials file. I’m trying to get the example to work…
and about the link: I’m checking the readme file now. at least the link says that the credentials file is created automatically after first authorization. I don’t get to that authorization is my problem…