I am building a website for my band and I would like to display upcoming events on it.
When I send a request from NodeJS to the Facebook Graph API (/{page-id}/events) with the app's token, I get a response back saying
(#10) This endpoint requires the 'pages_read_user_content' permission or the 'Page Public Content Access' feature. Refer to https://developers.facebook.com/docs/apps/review/login-permissions#manage-pages and https://developers.facebook.com/docs/apps/review/feature#reference-PAGES_ACCESS for details.
Is there a way to get this information without getting a business verification and app review?
It doesn't make sense to me that I would need that high level of permission as the information page is public and events can be retrieved by browser without even being logged in to Facebook.
Related
I'm trying to create an app in which I would like to display user feeds from social media apps like Instagram. I want the data to be as live as possible so I tried to integrate Instagram Webhooks. I have created a server side application with Instagram's authentication and a callback url for webhooks through which I want to fetch data from Instagram and then store it in a database.
I have been going through the Official documentation. I was able to get User id, name, comments through Instagram API and I have also subscribed Instagram's webhooks in my meta developer's application. It didn't throw any error but when I like or comment on my post I couldn't get any object in the callback URL. I'm completely new to this so It would be great if someone could explain me how to do this?
I've setup a sample FB page and connected an IG account.
I login using the FB Login and retrieve my user and page access tokens, and then I fetch IG Media for that given user. All works fine, but now I'm following the Insights API Guide and unfortunately when trying to fetch Insights for a given Media object, I'm getting a HTTP 400 error with the message
"(#10) Application does not have permission for this action"
I understand that for some advanced features I have to submit for a review, but this is a test-business account that I have setup. I also am querying the Media for my given user only, the one connected to the FB page.
Do I really need to submit for a review just to get insights of a Media, or am I just missing something?
My goal is to use the Facebook webhooks to get a notification whenever an IG user mentions my IG account. For that I have followed these steps:
I have created a Facebook page and connected it with an Instagram business account.
I have created a Facebook app (which is now live) and added the product "webhooks".
I have connected my app with my page.
I have created a webhook and subscribed to the mentions event.
I have tested the webhook, using the tools provided by Facebook and it works.
The problem I'm facing is that I can't get my app to work with real data. I have tried to mention my business IG account from my IG personal account, but nothing happens. My callback url is not getting called.
My app doesn't need users to login, so I'm not sure if I need to send my app for review. Do I need a special permission?
I had the same problem. For my case, when I installed the app via graph api explorer, the page token I was using didn't have the instagram_manage_insights permission. So I granted that permission, got a new token, re did the POST request to the {page-id}/subscribed_apps again with the new token and that fixed the problem. Just for the record, I used a system user token from the business manager.
Did you verified your Facebook app via app review? If not, you won't get production data via a webhook callback for the Instagram. I had the same issue and asked the Facebook support and got following response:
However, this is not the same for instagram or pages. This is just how the product teams have decided to implement it. For app review, you can show a mock process of the flow, using either the test webhook or your own process. The app review is less about technical implementation steps, but just a way to make sure that your app is going to use the permission in a way that follows our guidelines, so mocking the procedure should be fine. The reviewers understand that you do not receive webhooks in dev mode and should take this into consideration.
For more information check out following links:
Why is the Instagram Graph API webhook not working
https://developers.facebook.com/support/bugs/495933900986533/
I just figure it out of this problem.
There is a mistake in the official Instagram webhook guide:
With Graph API version 3.2, the /{page-id}/subscribed_apps edge now requires the subscribed_fields parameter, which currently does not support Instagram webhooks fields. To get around this, use your app's dashboard to subscribe.
https://developers.facebook.com/docs/instagram-api/guides/webhooks/#install-app
However, the app's dashboard subscribe is another function. You need your page to subscribe to some field to receive webhooks
Just POST /{your-instagram-connected-page-id}/subscribed_apps?subscribed_fields=feed&access_token={your-instagram-connected-page-token}
Then you will receive webhooks in live mode.
I'm trying to fetch posts of the users whom I follow in instagram. I've created the app, I receive valid access token, app is running in the sandbox mode. I've added a user in the sandbox, whom I follow, as in sandbox only sandbox user data is available for viewing. What I'm trying is to fetch user's follow list, that is successfully done through users/self/follows?access_token=ACCESS_TOKEN request, which succeeds and I already have the user id. Then I'm trying to call /users/{user-id}/media/recent for getting that user's recent media. I believe this should work, as I'm following that user and that user has approved my follow request. However the request fails telling following
{
"meta": {
"error_type": "APINotAllowedError",
"code": 400,
"error_message": "you cannot view this resource"
}
}
Some details how I've configured the instagram app.
The scope that I use is basic+public_content+follower_list.
I don't use implicit authentication, and have custom backend to handle authentication with client_secret.
Also, I know an app Followers+ which can read the media of each user you follow. So this should be something that is possible to do, and I don't know why I can't do that.
Any ideas?
Thanks
Looks the error you get if user is private, if the user is private, then you cannot access the user via API even if you are approved to follow by that user. This was a new change in API post June 1, 2016.
The only way to access private users is to use Instagram app or instagram.com
I want to retrieve a list of recent photos with a given tag to display on a website in a very simple gallery.
For that, the doc says I need an access token. However, it seems that the only way to authenticate against Instagram is through OAuth; which involves sending the user to instagram and allowing my application access to their basic data. However, I don't want my users to do anything; I'd like my application to authenticate against Instagram for me and then retrieve the data I want.
Sounds simple, but all online documentation seems to end up in "Redirect your user to...". And I find no sensible ways to do this programatically; it's all about sending users away, letting them authenticate, and then receiving the access token afterwards. I could of course scrape the HTML, parse the forms (for example, the unique-per-session csrfmiddlewaretoken field which needs to be posted along with login requests etc) and let my server side application pretend to be my own user and login/authorize the app, but that doesn't seem like the way to go.
I could also just authenticate manually in the browser, pick up the auth token and paste into my application; but as the doc says: "do not assume your access_token is valid forever." - so I'd like this to be fully automated.
If I try to create a WebClient and POST to https://www.instagram.com/oauth/authorize/?client_id={clientId}&redirect_uri={redirectUri}&response_type=code&scope=basic it just returns a 403 Forbidden which is of no use. (For what it's worth, I'm using C# and have found instasharp, but this problem is not tied to any given platform...)
Am I completely overlooking something, or am I right that server side authentication against Instagram has become really complicated? Most other social media platform API's I've touched lets me get some form of authentication token just by posting a combination of the application id and secret.