Creating a Like Button for a Facebook Photo -


hey, i'm trying create buttons facebook photos, can't figure out url use. or if it's possible. problem is, want display photos out of facebook photo album on microsite , want offer visitors possibility photos, when they're not visiting facebook.

the problem is: want likes (and if possible, comments, too!) on microsite , facebook synchronized.

i've tested , work:

$('#likebutton').click(function(){     $.ajax({        type: 'post',        url: 'https://graph.facebook.com/object_id/likes?method=post&format=json&access_token=token,        success: function(res) {           // style button         }     }); }); 

to unlike change type 'delete'

remember need determine if object in question before making call.

you give buttons specific name , append object_id class in order make each button unique , have method of getting object_id

you need permissions 'publish_actions' , 'publish_stream' work.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -