开发者

Facebook & Jquery - Share to show [closed]

开发者 https://www.devze.com 2023-04-04 04:16 出处:网络
开发者_运维百科 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
开发者_运维百科 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

How to create a Jquery function that works with Facebook API so that the content only is shown if the user has shared it?


If you're using the Javascript SDK to publish stories, show the content in the callback response when a user shares content successfully:

FB.ui(
 {
method: 'feed',
name: 'Google',
link: 'http://www.google.com/',
picture: 'http://google.com/xyz.jpg',
caption: 'Google Logo',
description: 'Search away'
 },
function(response) {
if (response && response.post_id) {
  // YOUR CODE GOES HERE
  // e.g.
  $("#some_div").show();
} 
});

Note: Make sure you have loaded the Facebook JS SDK and jQuery.

More about JS SDK here

0

精彩评论

暂无评论...
验证码 换一张
取 消