callAPI
Matt-McNeill opened this issue · 5 comments
I am getting a "Error. User name not found." error when calling getUserMedia. I am running R 3.02 for Mac. It looks like the underlying error is generated because the function callAPI is not defined. Perhaps it is part of another package?
search()
[1] ".GlobalEnv" "package:Rfacebook" "package:RCurl" "package:bitops"
[5] "package:httpuv" "package:instaR" "package:rjson" "package:httr"
[9] "tools:RGUI" "package:stats" "package:graphics" "package:grDevices"
[13] "package:utils" "package:datasets" "package:methods" "Autoloads"
[17] "package:base"
Thanks for any help you can provide!
Matt
@Matt-McNeill see the note I just added to the README. Instagram changed their API and it appears most endpoints now require getting your app approved by Instagram. I'm still trying to figure out what is still available, but my guess is that this error message is related to this problem.
Thanks.
On Dec 3, 2015, at 2:58 PM, Pablo Barberá notifications@github.com wrote:
@Matt-McNeill see the note I just added to the README. Instagram changed their API and it appears most endpoints now require getting your app approved by Instagram. I'm still trying to figure out what is still available, but my guess is that this error message is related to this problem.
—
Reply to this email directly or view it on GitHub.
https://www.instagram.com/developer/authorization/
An unapproved app (i.e. only with 'basic' scope authorized) can only get:
- /users/self
- /users/self/media/recent
- /media/{media-id} (if you are owner)
- /media/shortcode/{short-code} (if you are owner)
- /media/{media-id}}/comments (if you are owner)
- /media/{media-id}/likes (if you are owner)
Hi,
After debugging the code a little bit, I found two of the possible causes for this problem (could be more depending in the use case). Both of the causes are related to the changes that instagram made to their policies:
- Now you need, at least require scope="public_content" and the default of the library is scope="basic". So, this line
r my_oauth <- instaOAuth(app_id="123456789", app_secret="1A2B3C4D", scope="public_content")
is enough for the getUserMedia function. - Now your application start running in a SANDBOX where you just have access to the public information of the people that are part of that SANDBOX. So if you want to access posts or general info from another user, it is necessary to edit your instagram application definition in Manage Clients and send invitations to all that users from the SANDBOX section. And after that ask them for permissions to access that data.
Thanks everybody for contributing here! I have added information messages on all functions and documentation, to hopefully clarify this point!