Im trying to add new object through Object Browser.
I have 2 apps with facebook integration, they both api versions are 2.8,
in one of them everything works perfect, In the second one I cant add new objects.
Before facebook disabled Custom Open Graph and updated the api to 2.8 I had no problems....
First App: have the "New Object" button
The App with the option to add objects
Second App: doesnt have the "New Object" button
The App that has no "add" button
I've double checked all setting in both apps to see that I didn't forgot something and its all seems OK.
If there is any other option to add new object (not throuth the Object Browser) it will be great to. I've tried to add through Graph API Explorer with no success.
Thanks in advance
Moti Monsonego
As Facebook announced
Custom Open Graph stories are deprecated in Graph API 2.8. Graph API 2.7 and lower will support custom Open Graph stories according to the following schedule:
Support for creating new objects will end in January 2017. Support for
publishing existing objects will end October 2017.
Now we can only use predefined Object Types and Action Types
Objects instance are defined by Open Graph HTML markup on web pages. If you don't have a web server to host your content, you can use the Object API to upload and publish objects.
To get New Object Button in Object Browser
You have to first register object type
Go to Graph API Explorer
Get App Access Token
Change method To POST from drop down
Press Add a Field
write in Name Field object
In Value Field Add your object's JSON e.g
{
"app_id":APP_ID,
"type":"product",
"url":"http:\/\/samples.ogp.me\/306382486524859",
"title":"SAMPLE TITLE",
"image":"URL OF YOU IMAGE",
"description":"SAMPLE DESCRIPTION"
}
- app_id – This is the ID of your game.
- type – type of Object you arecreating.
- url – This should be the url of your game.
- title – The title to display.
- image – The url to the image that you want to display.
- description – A short description of the object.
Graph API Explorer Screenshot for help
Press Submit
If everything is correct, you should see an ID returned as a response.
Now Go To Object Browser
There will be a New Object Button
Related
I cannot figure why facebook is not translating stories which action types have custom properties. For instance, I have an action type called "think_about" with a custom property called "typo". When configuring the respective story I say that I want the following text:
- "John thought Something was {typo}"
I have created the corresponding translation in Spanish. However, the translation only works if I do not send the typo when calling the opengraph api. If I send a value to the option typo, the facebook story is never translated.
copy pasted the exact code from https://developers.facebook.com/docs/opengraph/getting-started/ , changed the appid. Yesterday it used to work..now..not so much.any idea?
Check the settings for your Open Graph action.
Go to the Open Graph Dashboard for your app on Facebook Developers.
Click on the Read action.
Click the Advanced link.
Make sure that Allow Multiple is selected for the setting called Unique action.
This morning I found out that Facebook is not returning the fb_ref parameter when you add it to links in actions or likes. Instead they seem to have replaced it with a series of new parameters: action_ref_map, action_object_map, ...
Could someone confirm me this change? This is breaking our software.
EDIT
This is an example that I've found:
http://uk.omg.yahoo.com/news/john-travoltas-year-gay-affair-pilot-revealed-122446486.html?fb_action_ids=10151047496853334&fb_source=other_multiline&action_object_map={%2210151047496853334%22%3A10151788645595106}&action_type_map={%2210151047496853334%22%3A%22news.reads%22}&action_ref_map={%2210151047496853334%22%3A%22type%3Aread%2Cuser%3A1k-WK59_Yk-EnPq2w1zMLBjX7nA%22}&code=AQCH-sq6XRSQCXj4QNkKlnusWLgIvBaZduNhGO0RNdiXgfCSGUOd1qinfHVw1iFQfs-0KVxFdPpWXD9nWrjEC1naU87H5W4GnxnTPL5j2raksea2pFxuy0rtgSpAa6ExZYCc7PkzIyjNnGTdK6N7g0Spb7qiqSboTgWZOojQJYbEF2XHenlROjhP8--NkvzrxU8#_=_
EDIT 2
It seems that Facebook has activated a new system for returning "fb_ref" in sandboxed FB apps.
https://developers.facebook.com/docs/fb_source/ is (and should be) the primary source of referral information and open graph actions have always had their own referral parameters showing which actions were present in the story/aggregation which triggered the click
fb_ref is provided when you had a 'ref' parameter on the source publish but as far as i know there hasn't been a change there
(e.g. like button with ref = foo results in a click back to your app with fb_ref=foo, fb_source=ticker or something like that)
I would like to know how to fetch the Actions linked to an Object in the Facebook Open Graph (knowing only the Object URL)?
Is it possible?
Also, Can I fetch a specific user action based on a specific object (connections?)?
FYI: I'm using RestFB but I'm ready to implement any other solution to achieve my goal.
Thank you,
Dimitri
Action and objects are not connected in an absolute way, every time you post an object using an action you create a link and only by this link you can fetch the pair (action/object).
In fact with my custom namespace I have only one object that I publish with three different actions, and by knowing the object url I know nothing about the actions.
But having the ID of the post generated by the action you can know the action used, as described here: https://developers.facebook.com/docs/opengraph/actions/#read
Hope this helps
I have a music app that I developed using HTML5's canvas. As different songs are selected, I have jquery that dynamically updates the URL in the browser to point to the correct song. I also have jquery that updates fb:like element. By using the debugging tool, I'm able to cache the pages (since my server is able to return correct meta-data for each URL provided).
When I do this and like something on my website, I end up with a message saying "Sami liked a page." with some info underneath.
Next, I use the Open Graph curl commands to add a Recommend action (something I've created) to a given URL from my website. Now, when I like the same url, I end up with a message saying "Sami recommends this link" with some info underneath.
What I'd really like to do is have this message display "Sami recommends a song on website", which is what the message looks like when I look at the preview for my Song object in the Open Graph. Is there any way to do this?
Best,Sami
EDIT: probably good to note that I'm also getting some extra meta info from the website (such as og:site_name), but that this stuff is not being saved into the Actions portion of my Open Graph (as in I can't view that info using the Open Graph link to view my current Recommendations), though I can see it using the debugger tool.
The facebook like button "triggers" the most generic action which is the like, you can how ever change the like button to use "recommend" instead of "like".
In the documentation for the like button, in the attributes table you can see the "action" attribute which is:
the verb to display on the button. Options: 'like', 'recommend'
Also when you "Get Like Button Code" thing you can select Verb to display.
If you want to use your own actions you'll need to define them in the app settings page as explained in the Define Actions guide.