Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to Twitter API #363

Open
giacobe opened this issue Jun 17, 2016 · 1 comment
Open

Cannot connect to Twitter API #363

giacobe opened this issue Jun 17, 2016 · 1 comment

Comments

@giacobe
Copy link

giacobe commented Jun 17, 2016

Having trouble connecting to Twitter API to pull data into a project as a layer.

We have reviewed the documentation, but cannot seem to resolve the OAuth issues. Using the Layer for "Social Media" and have tried to use the fields for URL and token with no success.

Any pointers would be greatly appreciated.

Also, looking for similar configuration pointers for Instragram and maybe Flickr.

@stephenrjones
Copy link
Contributor

Hi Nick,
The Twitter interface was actually a test project that an intern did here last summer. We've never rolled it into our main baseline as there were several issues that he encountered (most notably he created a daemon process to connect to Twitter and filter some of the data coming back).

Although we haven't added OAuth to the project, I would think that would be pretty doable. I've done that for another project, and used the 'requests-oauthlib' package (as well as Flask-OAuthlib as I used Flask on that project). Worked pretty well as is for GitHub integration, but had to tweak it slightly for Google OAuth.

For the Instagram and Flickr integration, one of the big things needed is a valid API key. For our Instagram, we define the "Social Media" layer url like this:

https://api.instagram.com/v1/media/search?lat={{lat}}&lng={{lng}}&client_id={{key}}

Then in the 'Extended Form Options' add a "key" to the 'Layer Params' field (which you get from Instagram themselves):

{
'key' : 'abc1123...'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants