I pretend to integrate my website with facebook, whant to make a automatic post (on a specific facebook account) while a user interacts with a web application.
is there any way to make this operation like a webservice way?, authenticating and calling a url that posts the information i send directly on the facebook wall?
i’m using asp.net mvc3 C# i’ve found a facebook developer toolkit library, is this the correct way to start or what should i do?
What is necessary is only write a post automatically on a facebook account, for example when i write a new article (news) on my website, it will be automatically posted on fb.
any idea to get me started?
I did something kind of similar, when a user clicks on a “share” button on my mvc app, it posts something on his wall. The problem using the oauth dialog, is that it will redirect the browser to a facebook site for the user to log in and accept the application permissions.
On the “share” button, I linked it to this url:
YOUR_APP_ID is your facebook application ID.
THE_REDIRECT_PAGE is a public page on your site that facebook will automatically redirect once the user has logged in and accepted the permissions. When facebook redirects, it appends a querystring parameter called “code” to it.
NOTE: The redirect page MUST END with a “/”, it cannot end with a document, or else it doesn’t work!
Once the user has accepted your request, you must ask facebook another code, called access code, used to post on the user’s wall.
This code is on the redirect page:
Once you have the access token, you can post to the user wall:
You can see that on the exception I throw the posted url (for debugging purposes).
With that url you can usually go to the facebook Graph API Explorer or the Linter and check the real error.
I don’t know if this is exactly what you want but hope it gives you a kickoff…
I’ve struggled a few days with this, because facebook documentation on open graph is not very good yet, at least for us that don’t use curl 🙂
https://developers.facebook.com/docs/opengraph/tutorial/
https://developers.facebook.com/docs/opengraph/
Hope it helps.
MT.