Facebook Like Button Count for URLS that Already Have Likes/Shares/Comments - facebook-like

I am trying to implement a like button on a blog. The blog gets a decent amount of traffic and most posts get 10-30 likes, 5-10 shares and any number of comments on Facebook. I am implementing a like button for each post using the iFrame code copied straight from Facebook's Like Button page (http://developers.facebook.com/docs/reference/plugins/like/). When I do test URLS, like "test.com" a count will show up; however, when I use a URL from the site that I know has a combination of shares/likes/comments, no count shows. Additionally, when I run the link through the graph.facebook.com, it shows that there are shares (e.g., http://graph.facebook.com/http://test.com). Now, if I pressed the like button I do get a count of "1" to show up. My questions are thus:
1) Should I expect the count to show up for posts that have shares/likes/comments, but I'm just now implementing the button for it?
2) Is there anything special that needs to be done with the URL sent? URL encoding? Adding/not adding "http://"?
3) Is there a latency to the count? For instance are the counts cached and updated at different times?
Thanks for your help!

1) I don't think they will ever show up if they haven't so far.. (see answer 3)
2) No. An URL with or without http:// will be treated as the same URL. But I recommend using http://
3) If by latency you mean delay, then no. Likes/shares/comments count are updated almost instantly.

Related

Facebook likes disappear

I have the following issue: I recently made a url rewriting change to my website. So I changed pages with url http://www.in2life.gr/features/notes/articles/261434/article.aspx to the slightly better http://www.in2life.gr/features/notes/article/261434/h-athhna-mesa-ston-hrono-istoria-se-21-eikones.html format.
Now, in order to preserve the FB like count in the old url, I made sure that I rendered the FB like button using the iframe with the old url: https://www.facebook.com/plugins/like.php?locale=el_GR&href=http%3a%2f%2fwww.in2life.gr%2ffeatures%2fnotes%2farticles%2f261434%2farticle.aspx&layout=button_count&show_faces=false&width=125&action=like&font=trebuchet+ms&colorscheme=light&height=21. The problem is, the FB like count reset to zero! I am absolutely positive that this particular article had quite a few likes, but if you hit the FB graph page (https://graph.facebook.com/?ids=http://www.in2life.gr/features/notes/articles/261434/article.aspx) you may see the comment count (90) but the likes have disappeared!
Anyone know under what conditions could FB do that? Is it perhaps that in the new page I have put a canonical url in the new format, and perhaps FB parsed this and thought the old url is invalid?
Well strangely enough, 9000 likes have magically reappeared in the graph response: https://graph.facebook.com/?ids=http://www.in2life.gr/features/notes/articles/261434/article.aspx
I will never understand why FB chose to hide these likes 3-4 days ago.
This is a bug:
Report 1 /
Report 2

How to automatically track when a bit.ly link has been clicked x times

I'm looking into running a promotion where users who tweet a custom bit.ly (or any other url link service) link and have that link clicked by others x times (say, 3 times) will automatically have a piece of content (think a pdf) unlocked for them.
I'm at a bit of a loss as to how to accomplish this. I was thinking of using IFTTT.com, but they don't track how many times a bit.ly link has been clicked.
So steps would be the following:
Generate a new unique link to a given webpage
Track when that link has been clicked 3 times
Automatically send user an email when the link has been clicked 3 times with a link to unlocked content
Anyone have any ideas here? All I can think of is scraping bit.ly's stat page periodically and then seeing how often a link has been clicked, but that seems potentially quite slow and resource intensive.
The clicks API endpoint will tell you, but it's pull-based, not push, and there are API rate limits.
You could host your own URL shortener that would take care of counting the clicks, then redirecting to bit.ly/whatever, emailing, etc.
For instance: http://yourls.org/
Edit: well, bit.ly seems to have a pretty nice API. Check http://dev.bitly.com/link_metrics.html#v3_link_clicks

Integrating social plugins - likes disappeared

So, researched this forum for the same problem, but still without success, any solutions haven't worked for me.
The problem is that we had four pages which ones have had like buttons. So we launched advertisement campaign, have collected some likes (more than 100 likes per page). Now we added one more like button for entire site and likes for these 4 pages now are equal to 0.
How this happened and where the likes disappeared? I'm new to this project so maybe I'm missed something (like metatags, app ids or etc.)?
Reverting project also haven't helped.
The pages I'm talking about (sorry, for separating links, but the editor wont allow me to post more than 2:
http://www.tradicinekolekcija.lt/
- index.php/kolekcijos-alus/old-port-ale/58
- index.php/kolekcijos-alus/baltijos/17
- index.php/kolekcijos-alus/ekstra-draught/16
- index.php/kolekcijos-alus/baltas/15
Your metadata is all right, you can check the data FB is scraping by using the debug tool. Just paste your pages' urls in https://developers.facebook.com/tools/debug.
The problem is that in the like buttons you're always using data-href="http://www.tradicinekolekcija.lt/" so you're always showing the like button and the count of likes for the main page. Just update the code in each of the urls' like buttons to point to the right url (the same url of the page where the like button is).
This should fix the issue!

Facebook Open Graph OG: Meta Tags - Works only sometimes?

I have a like button on my site, i have defined all the og: meta tags and its works for most of most pages, but doesnt for 2 other pages. Its using a template so its exactly the same code, how can it work for some but not all pages?
For the pages it doesnt work, it doesnt pick up the title, image, link or description, basically any of the meta tags information.
Working like button....
http://www.imoffonholiday.com/holiday.php?id=des_home&destination=faliraki
Not working Like button
http://www.imoffonholiday.com/holiday.php?id=des_home&destination=ayianapa
Any ideas?
One usual problem is caching. If you were testing and at some point had the wrong data in the metatags facebook will cache that info.
One simple wat to test if it is a caching issue is to add a random param at the end of the URL.
so www.yourpage.com/index.php?cacheBust=1
Running the Facebook Debugger often clears those kind of things up. It appears to refresh the FB cache when you do.

Caching data (image, rss) with django

That's my first question in here, I've been looking through old questions, but nothing matched with my problem. Here it is.
I'm creating some site with one main functionality. We want this site to display content of other sites, but in a specific way. User chooses let's say two pages from five and want to see their content. He clicks button 'Display' and goes to next page where he finds let's say view from web cam, and here comes problem.
I want to cache image that is hidden behind the url from which image was downloaded, so after refresh image won't be downloaded again, but browser will get it from cache.
I've been looking through documentation of Django, but nothing seemed to be useful.
I know that I should:
1) create table which stores cache
2) add to settings.py some CACHE_BACKEND = ...
3) use #cache_page(300) before declaration of function which returns content which should be cached,
but... it doesn't seem to work.
I will be greateful if someone tells how to solve that problem, maybe with some sort of code showing the mechanism.
Cheers,
Chris.
I think that right way to do this will be to store image somewhere on your server and delete it later with cron or something similar.
Django cache framework wasn't created for the purpose you are trying to use it.