I have some trouble here, do you know Yahoo! News? I want to create a widget like that (when you read an article it is published on your Facebook).
I’ve just created the Facebook apps and the Open Graph, but I don’t understand how to insert it into my website, I am using WordPress, and I was searching on Google but I still don’t understand, hope you can help me.
I still dont understand, i’ve just create the apps and also the opengraph, also insert the opengraph tag on my header and the function, but when i try to open the post page, i get “Error Occured” How? can you help me?
You need to understand how the concepts work by reading the documentation
Your action is news.reads, so you would call as follows
POST https://graph.facebook.com/me/news.reads?article=[article object URL in your WordPress Blog]
In order to have this work you need to set up the built action type
read
in your app settings:https://developers.facebook.com/apps/YOUR_APP_ID/opengraph
Then you must have the
article
type for the object set.Then you must set up an object url on your WordPress blog these are done by inserting meta tags
So you would put these in your header.php or index.php file based on your theme setup. Then you would have to insert functions and if statements based on your theme setup such as
The URL of the post
A single post title
Then you need to lint this url to ensure you have setup properly, you can do this via
Once you are sure the meta tags are set properly you need to test the action as mentioned earlier
POST https://graph.facebook.com/me/news.reads?article=[article object URL in your WordPress Blog]
If everything is set this should return the id of the action.
Then you must implement the logic for authentication using the JS SDK
and the login button plugin
<fb:login-button show-faces="true" width="200" max-rows="1" scope="publish_actions">
</fb:login-button>
Either in a functions.php file or directly within the single.php and index.php pages
From there you must create a function to call the action below on page load