I'm trying to make a Facebook video application so users can have a video stored on my site displayed on their wall using Facebook Open Graph.
I'm using the below code for user login.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'MYAPPID', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
// Load the SDK asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
Now how do I implement the Watch action?
curl -F 'access_token=myaccesstoken' \
-F 'movie=http://samples.ogp.me/453907197960619' \
'https://graph.facebook.com/me/video.watches'
And this
curl 'https://graph.facebook.com/me/video.watches?access_token=myaccesstoken'
in PHP? And how can I get the access token of users?