Async facebook buttons - facebook

I want a like button on my page. To share the page. When you click on the like button. He must post on the facebook wall. A custom post with a link. How can i make this with facebook.
The problem is. I want two like buttons with different text and url on the site. How can i do that?
Thanks,

I think what you are asking for is Share button, not like (there is no text/message in like button)
https://developers.facebook.com/docs/share/
You specify url to share like this
<a name="fb_share" type="button" share_url="YOUR URL GOES HERE"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
You can specify description/text useng Open Graph https://developers.facebook.com/docs/opengraph/
<meta property="og:description" content="Blah blah bla" />
This, howver, has nothing to do with asynchronous loading of script, so I'm not really sure what you're asking for. Hope this helps at least a bit.

Related

facebook share buttuon image not working properly

i don't know english very well and sorry about this. then i try to explan my problem
i want to add facebook share attribute to my site. code below
head tag
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
body tag
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">
<img src="img/pFace.png" alt="Share on Facebook" /></a>
then test my code link doesnt work but when delete img tag share work properly.
where is the mistake?
I discover that actually issue is facebook share link is not loaded or delay.
In your view what is possible problem?
The share button is depreceated. It's preferable to use the 'like' button. See https://developers.facebook.com/docs/reference/plugins/like/

Facebook like button on posts not working properly

I am using open graph for the first time. In any url like this you you can see a like button for the site's facebook page at top and another like button after the heading and summary of the article. The second like button is not working as required. If I like from that link then instead of the article the website's facebook page gets liked and the information which I want to show to other facebook users who see that like post is the summary of the article but instead it show that the person like the page alazydude. And the image is also not displaying which I have specified in the open graph tag. The website is still incomplete. I have tried many times now.
Have a look at this page. The second like button in the middle is not working properly.
Make sure you use the correct data-href in your code to like an article. (You should refer to the URL for that single article, even if it's on a page with multiple articles.)
For example:
<div class="fb-like"
data-href="http://www.yoursite.net/articles/unique-article-id-goes-here-or-something-like-that"
data-send="false"
data-layout="button_count"
data-width="140"
data-show-faces="false"
data-font="segoe ui"></div>
Facebook has developed a handy little tool to create that code for you!
Make sure you check out the Facebook Developers page on like buttons.
When this is done correctly, it should get the opengraph-data from that link and that would be fixed simultaneously.
You do have to make sure that the og-data is set correctly. (This is on the www.yoursite.net/articles/unique-article-id-goes-here-or-something-like-that page.)
<meta property="og:title" content="Title of the article" />
<meta property="og:type" content="article" />
<meta property="og:url" content="same-url-as-the-data-href-from-like-button" />
<meta property="og:image" content="url-to-image-you-would-like" />
<meta property="og:site_name" content="Name of your site" /
Good luck!

clicking like button results in nothing after adding open graph meta tags

I am adding dynamic like buttons to all the items on a website of a client, they do work now (after a lot of trial and error) but it still asks the user to confirm the like.
I tried the facebook debug tool and it gives me a bunch of open graph warnings and like button warnings that should be fixed.
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.bowmanmusic.be%2Fbowman%2F
So I add all the required open graph meta tags to the head of my page like so:
<meta property="fb:app_id" content="159728304104034" />
<meta property="og:title" content="Bowman" />
<meta property="og:type" content="band" />
<meta property="og:url" content="http://www.bowmanmusic.be/bowman" />
<meta property="og:image" content="http://www.bowmanmusic.be/bowman/images/bowman01.jpg" />
<meta property="og:site_name" content="Bowman Music" />
<meta property="og:description" content="Bowman website" />
And now it still asks the user for confirmation but it doesn't register the like anymore i.e. it doesn't appear in the timeline nor in the event log.
I am loading the fb sdk like so:
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
And this is my php for the like button:
echo "<div class=\"fbbutton\"><fb:like href=\"http://www.bowmanmusic.be/bowman/index.php?id=",$id,"\" send=\"false\" layout=\"button_count\" show_faces=\"false\"></fb:like></div>";
I would like to get rid of the need for confirmation and off course that the like event shows up on the users timeline.
Does anybody now how to solve this?
The way you include the like button is not good (especially the synchronous inclusion of the javascript SDK). Please use the generator on the like plugin page:
https://developers.facebook.com/docs/reference/plugins/like/
also, i don´t see any like button on your page. All menu entries just lead to the same image. Keep in mind that every page that has a like button MUST be public (not behind a user login or whatever).
Btw, you should use an App Id for the Like button (see plugin generator), should prevent you from getting the confirmation.
...not to mention that every page that can be liked must have the correct open graph tags, not just the homepage. So, if you want to like "http://www.bowmanmusic.be/bowman/index.php?id=xxx", you have to make sure that the specific site got the correct tags, including the correct url with index.php and stuff. In any case, you should rewrite those urls, but that´s another long story...

Facebook share 'clickable' url-link issue

I have a problem with clickable url-link in Facebook.
As you can see nr 1. is not clickable but nr 2 and 3 are.
Sometimes it is clickable and other times not. (randomize)
What I want is that all the share links are not 'clickable' like nr 1.
How can I fix this? I'm stuck for several days.
My php code:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<li class="icon share_facebook l" id="facebookshare"><a name="fb_share" type="button" share_url="http://www.smartnet7.com/promo.php?id_promo=<?php echo $id_promo?>&username=<?php echo $username ?>"target="_blank"></a> </li>
I hope some body can help me!
The problem might be with the page that you are trying to share. As mentioned earlier in the comments above, you may check the same page's link by Facebook Linter. To achieve a uniformity you may want to include the Opengraph meta tags as recommended by Facebook http://developers.facebook.com/docs/opengraphprotocol/
In your case it looks like an issue with Facebook populating your page url so you might want to include <meta property="og:url" content="your page's complete url"/> within the <head> </head> tags in your page. Even though this url can be determined from your page alone but Facebook recommends you to include these tags to avoid any inconsistency.
May be number 1 isn't clickable as it is not a valid url(although browser should figure it out). It should have www. in the beginning

AddThis button + Facebook Like button

I am trying to use AddThis button on a web page of mine, which you can share, like (facebook), and tweet (twitter) -
the AddThis code is pretty straight forward below,
<!-- AddThis Button BEGIN -->
<div id="share" class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a><!---->
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4cdb5be51dc49c98"></script>
<!-- AddThis Button END -->
but I don't understand - in the code above, where can I put the image or video url which I have uploaded and posted on my fb page? for instance the url below is the image from my facebook page that I want to track how many people like this picture through my website,
http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971
I have read through the documentation on AddThis but it doesnt explain this at all!
http://www.addthis.com/help/client-api#configuration-sharing
It points me to this,
http://developers.facebook.com/docs/reference/plugins/like#
again, this is a Facebook plugin, no used within AddThis. If I am using the Like button from the Facebook API, then I cannot use the AddThis plugin above, can I?
furthermore, The Like button from Faebook API seems to work on the Facebook page, but not an individual picture or video I uploaded/ posted on my Facebook Page, for instance, I tried this on my localhost, the picture on my Facebook Page won't collect the number of likes even though I have clicked the Like button on my screen.
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971" layout="button_count" font="arial"></fb:like>
so my main doubt on the Like button itself - does it work on facebook only or does it apply to the individual picture/ video on my facebook page? I tried to find this answer from the facebook Like documentation but it doesn't explain anything about this.
it would be grateful if you have any idea. thanks!
Try this:
...
<div class="addthis_toolbox addthis_default_style"
expr:addthis:title='Photo'
expr:addthis:url='http://www.facebook.com/photo.php?fbid=10150115644909972&set=a.10150115644754972.329183.55239684971'>
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_counter addthis_pill_style"></a><!---->
</div>
...
See also: http://www.addthis.com/help/widget-sharing#tagging
You might get an error with the add this way to display the Facebook Like Button and IIS7.0.
I had the problem yesterday and have posted a solution here.
Hope this helps,
Covo