简体   繁体   中英

Post and share on facebook on button click

In my site i can give comment to any category or movie i just want when user rate any movie with comment that comment also post on FACEBOOK and share category data on FACEBOOK.

if anybody have knowledge how to implement this please tell me.

我建议使用Share This,它的实现起来非常简单,而且就像一个魅力

I've made a custom function.

Example:

function sharreBrag(){

var obj = {
    method: 'feed',

    link: app.home,
    picture: app.home + '/img/logo.png',
    name: 'TITLE!',
    caption: 'whatever you want',
    description: 'description'
};

function callback(response) {}

FB.ui(obj, callback);

};

The app.home is a variable with the link to your site.

Also you need to include the Facebook root into your footer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM