Reputation: 888
I have a website that uses the Group Buying Site plugin (http://groupbuyingsite.com). It uses facebook app to login and register.
When I add a new item to the cart the user is redirected to cart.php
and the function add_item($product_id, ...)
is called. I want to know if there is a way that when I enter this page I automatically share a post on facebook timeline.
Thanks.
Upvotes: 0
Views: 6529
Reputation: 1
$result = $facebook->api(
'/me/feed/',
'post',
array('access_token' => $access_token, 'message' => 'Your Post here')
Upvotes: 0
Reputation: 6000
Assuming you have the access token, I suggest you try this:
$result = $facebook->api(
'/me/feed/',
'post',
array('access_token' => $access_token, 'message' => 'Your Post here')
);
Upvotes: 2