Facebook Graph API: Not able to enable Explicitly Shared. What to do? - facebook

I have some problems using the Facebook Open Graph API!
I just addet a new Facebook App for publishing some bike and run courses via a iOS and Android app - I just did that the same way as in an another app, which is doing kindly the same!
Anyway - I can't find the open graph-settings in the facebook-developer-dashboard for the new app!
See screenshot -> left: old app, right: new app
As you can see - there is no possibilty to change open-graph settings!
The Facebook Api (v2.8) responses, that I have to enable the "explicitly shared", but I can't!
{
"error": {
"message": "(#100) You haven't enabled Explicitly Shared for this action type (***************) yet. Please update your Open Graph settings in the App Dashboard",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "EEaAYiLwyas"
}
}
I do everything exactly the same way as in the old app, which works great.
Do anyone have any ideas what to do?

Related

An unknown error has occurred with graph Facebook

I have an element on my website which shows facebook posts from a page and the amount of views/likes/comments. This stopped working all of a sudden and I have no idea why.
If I make the request with the graph api tester tool I get:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "CIHVxFhXIv/"
}
}
This is the request link I use with file_get_contents:
https://graph.facebook.com/v3.0/idofmypage/posts?fields=comments,full_picture,likes,message,picture,story,permalink_url,updated_time,from,insights.metric(post_impressions)&access_token=myaccesstoken
Did something change again with permissions or maybe a field is deprecated?
According to this fb new the Pages API and others have changed, and now you can only access the data if it's a page of your own.
Pages API: Until today, any app could use the Pages API to read posts or comments from any Page. This let developers create tools for Page owners to help them do things like schedule posts and reply to comments or messages. But it also let apps access more data than necessary. We want to make sure Page information is only available to apps providing useful services to our community. So starting today, all future access to the Pages API will need to be approved by Facebook.
Today I've started a project wich, in the begging, I need to recollect data and that's what I've found about it..

I don't have access to get all invitable_friends at Facebook API using javascript

I'm trying to get all facebook invitable friends, yesterday it was working, but today the facebook API has return that
{
"error": {
"message": "(#100) No permission to access invitable_friends.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "ApJrz2NAGPx"
}
}
In addition to being a game, you must have the Canvas platform set up. And you must have a playable version of your game on canvas. If that is not the case, then you are not allowed to use invitable_friends in the first place.
Possible alternatives for inviting friends are explained here: https://developers.facebook.com/docs/apps/faq#faq_1291953124230220

Facebook Graph API Updating Privacy Parameter

Context:
I have a facebook page with a post
I want to hide that post from anyone accessing the page (other than me) using the Facebook API
This can be achieved using the privacy field with "SELF"
Problem: Before I can even use it in my application, I cannot get a working example in the Graph API Explorer. I am using:
POST /v2.7/POST_ID?privacy={"value":"SELF"}
This works with other properties such as message, but despite many attempts, when I am able to actually set the privacy value property I always get the following message:
{
"error": {
"message": "(#100) Failed to edit object",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "DkL5f4bzK2E"
}
}
Question: Can anyone provide a working example?
References:
Graph Explorer: https://developers.facebook.com/tools/explorer
Privacy Parameter: https://developers.facebook.com/docs/graph-api/common-scenarios#privacy-param
After asking Facebook Support Team if it was a bug, it is not, their answer:
You cannot edit the privacy of a post on a page . You can choose to
publish / unpublish it , if needed.
To change the audience of the page itself, you will need to edit the
settings of the page.
This is by design.
You can also see their answer directly: https://developers.facebook.com/bugs/152272141874454

facebook - Like a page through API

I'd like my application to like a facebook page on behalf of the user with an API call.
I saw this part of the documentation and tried to make the following post request:
https://graph.facebook.com/101544000571/likes?access_token=MY_ACCESS_TOKEN
where 101544000571 is a page id and got the following error:
{
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3
}
}
I thought it's a permission problem but the application (in this case it's the graph API explorer application) has all the permissions necessary.
What am I missing here?
You cannot like a page using the Facebook Graph API. It is not supported.
You can use the the Like button social plugin.
The doc mentions : "For Facebook Pages or websites that do not integrate with Facebook Authentication, developers should continue to use the Like button social plugin."

Error with Twitter link

Yesterday I started a new app on Facebook. Today I got the message that when people copy the link to Twitter they get an error. This is what you get:
{
"error": {
"message": "Unknown path components: /your_namespace:your_action",
"type": "OAuthException",
"code": 2500
}
}
What does this mean? What could be the problem?
Are you actually sending the POST action link to Twitter? Why?
I think you misunderstood how Open Graph works. Basically, you should be the one publishing actions when users take an action using your service. You can use a server-side or a client-side language to POST request (when you click a link, your browser actually makes a GET request, not a POST) to https://graph.facebook.com/me/namespace:action?access_token=ACCESS_TOKEN&OBJECT_PATH=OBJECT_URL
Note that you need to create an app, use it to authenticate users to get the access token and also set your custom actions / objects. These will need to be approved before you can actually use them.
You should start by taking a look at the sample apps to see how they work: https://developers.facebook.com/docs/samples/