I am trying to make a POST request to the Facebook API to create instant articles, like so:
curl
-F 'access_token={access token}'
-F 'html_source="<!doctype html><html>blah blah blah</html>"'
-F 'published=true'
-F 'development_mode=false'
https://graph.facebook.com/{page-id}/instant_articles
I am an admin for the app, and when I debug my access token, the scope shows email, pages_show_list, pages_manage_instant_articles, public_profile
, but the request returns this error:
{"error":
{"message":"(#200) Requires pages_manage_instant_articles permission to manage the object",
"type":"OAuthException",
"code":200,
"fbtrace_id":"Exyv2VtZ5m4"}
}
Anyone have any ideas about what’s going on? Thanks and let me know if you need more info!
2
Answers
Solved! I added the version to the url.
https://graph.facebook.com/v2.7/{page-id}/instant_articles
When I first worked with Graph API I faced the same issue but that was in Android.
Although the solution in my case, user / admin have to sign in first and give permission to access facebook data using GraphAPI