facebook share buttuon image not working properly - facebook

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/

Related

Customizing Addthis Plugin - passing url using classic asp

I am having lots of problems while coming up with a solution.
I have a website that share text or image greetings( text greeting only at this time) on facebook or twitter etc. I planed to use Addthis.
So I created a function like this
<%
Function DisplayShareDiv(surl, sT, sSummary)
%>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style"
addthis:url="<%=surl%>"
addthis:title="<%=sT %>"
id="addthis_container"
addthis:Description="<%=sSummary%>">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_google_plusone"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = { "data_track_addressbar": true };</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=###################3"></script>
<!-- AddThis Button END -->
<%
end function
%>
Now problem is that title appears when click on facebook or twitter but url doesn't. I also want to add the description to it. I have og tags too but they need to be dynamic too and i am having problems with fb not picking up that info either. Even though i have run it through debugger. I am at it for 2 days and it is now all a mish mash. I would really appreciate if someone can please help me!!
Now I'm getting this. Is that as you require?
I think facebook was picking up an old version of your page.
The text it picked up were from the OG and description meta tags on your home page.
If you run your page through their debugging tool, that forces it to scrape the latest version of your page. Plus you might get some useful info too. https://developers.facebook.com/tools/debug/

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

Async facebook buttons

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.

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

How to embed iframe in facebook?

An associate of mine maintains a facebook page for the company we work for.
The company wants a widget to put on their facebook to allow users to enter their email and subscribe to our newsletter.
The associate who does facebook is not a programer so he asked me to build something.
I made a small page that uses jquery and ajax to allow you to enter your email address and it sends it to our server using ajax so you never leave the page you are on.
We want to embed this page on facebook using an iframe.
First we just tried entering the iframe, which did not work,
then we found a tutorial and tried to embed the iframe the way it says like this:
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Let's see that iframe....</a>
<div id="outside_location"></div>
<fb:js-string var="link_1">
<fb:iframe height="500" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%; border:none" src="http://URL-TO-OUTSIDE-LOCATION"></fb:iframe>
</fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = document.getElementById('outside_location');
</script>
It seems like facebook is appending things to our variables so link_1 becomes something like a325461252_link_1
Then we get a JS error like this:
Uncaught reference error:
a325461252_link_1 not defined
But every once in a while it will work but 99% of the time we get this error.
I have never built anything for facebook before, I am not sure there is is some sort of facebook way of doing things.
Is there something I am doing wrong? I have done many google searches trying to find answers and everything I find varies from "facebook does not allow iframes" to "facebook recommends iframes" so I really don't know what to think.
Check to see that your application is setup as an FBML applicaiton and not an Iframe application. An iframe application will not expand fb:... tags by default. Also inspect the DOM (Chrome or Firebug) to see if the Dom is getting changed when you click the link, but the iframe just isn't visible.
I just tested the following and it worked:
<hr/>
<a onClick="outside_location.setInnerFBML(location_two);" style="cursor: pointer;">Other IFrame Location</a>
<div id="outside_location" width="540" height="270" >
<fb:iframe width="540" height="270" frameborder="1" src="http://www.yahoo.com" />
</div>
<fb:js-string var="location_two">
<fb:iframe width="540" height="270" frameborder='1' src='http://www.google.com' />
</fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = document.getElementById('outside_location');
</script>
If all you wanted to do is add an iFrame to your application canvas then you can simply use this line:
<fb:iframe width="720" height="570" frameborder="1" src="http://www.yahoo.com" />
Or just change your application from an FBML canvas application to an iFrame application and point your Canvas Callback and Connect URL to your current page or page's directory. If you aren't using Facebook's API or FBML elements then you may not need to be in an FBML application at all.
BTW: To programmatically add iframes in Facebook you can use JavaScript like so:
<script type="text/javascript">
var Iframe = document.createElement('iframe');
Iframe.setStyle('smartsize','true');
Iframe.setStyle('frameborder','yes');
Iframe.setStyle('scrolling','no');
Iframe.setStyle('include_fb_sig','true');
Iframe.setStyle('width','500px');
Iframe.setStyle('height','500px');
Iframe.setSrc("http://www.msn.com");
document.getRootElement().appendChild(Iframe);
</script>
Good Luck!