First of all, you need to create a key for your application Here .
Then go to Aba Apps, Create New App
AftertheapplicationyoucreatedyoucangetAPPID
here:
After that, you can use the share button on each of the content as well.
No HTML
:
<div class="fb-share-button" data-href="http://pt.stackoverflow.com/questions/10272/postagens-automaticas-no-facebook" data-type="button_count"></div>
No Javascript
:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=XXXXXXXXXXXXXX";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
Instead of XXXXXXXXXXXXXX you should place the key of your application.
You can use cURL
as indicated here
But I think it's much simpler to use PHP
for this task, because you'll need the access_token of access, achieved only after logging in with your
application in API
of Facebook
.
To automate using PHP
you should use the Facebook
API, using SDK
in PHP
.
Here has the link to the SDK
And here has an example of how to post using PHP
and API
of Facebook
The steps for creating APP ID
are the same