Programatically,
How can I get the canonical link from bit.ly?
How can I get the number of facebook likes given a canonical link?
How can I get the number of twitter mentions given a canonical link?
If I understand you correctly, you want to take a http://bit.ly/s.... link and get the original, long URL, then find out the number of likes for that long link on Facebook, and tweets containing it on Twitter. Is that all about right?
For the first part, you can use the link info API to get the long URL from bitly. It may or may not be "canonical," though. It'll just be what was shortened. So it might have extra campaign parameters.
Community Wiki in case people can help with the second two parts of the questions.
Related
I'm trying to get number of likes on videos. So I go like
https://graph.facebook.com/v4.0/{video_id}/likes?access_token={token}.
However I always get back empty data even if video has at least some likes.
I've created a token with following permissions: scope="public_profile,email,user_videos,manage_pages,user_likes".
The last thing to mention is that the video is posted by user page. I've also tested the same thing on Graph API Explorer and it doesn't even work there.
I for example can get comments on the same video...
The individual likes are likely not available to your app due to privacy concerns (the liking user would probably have to grant your app access to access their made likes first)
But since you are only interested in the overall number, asking for the summary should do it:
/{video_id}/likes?summary=1
or when using field expansion syntax,
/{video_id}?fields=likes.summary(1)
I'm writing an classified ads website, I need that the users renew the Ads only clicking in a URL that I will send by email. What cautions should I have implementing a system like this? I've searched on the web but didn't find examples of an implementation like this.
Can someone give some clues about the right path to do this?
Best Regards,
First off, SQL Injection will be a major thing to worry about, especially when using obvious get parameters.
Second, you will want non-personally identifying info in the GET parameters. You will NOT want short ids such as 123456 as these are VERY EASILY guessed. A GUID (example 412dc535-03dd-4887-b702-02c8b85e8891, you would remove the - of course) is great for this.
Third, you will want some sort of basic verification that it is in fact the user that originated the request. Have each email have its own ID for the one click action, perhaps a GUID (long string of random characters), and make them expire after some time (a few days). Keep track of each email link separately and what they're supposed to do, so that someone couldn't just figure out the ID of someone's ad and keep running it over and over.
~Christian
Could someone do me a flavour and let me know if you also get back an empty json array when you click on the sample user search url on the Facebook Graph Api docs page.
Here is the page http://developers.facebook.com/docs/reference/api/
It is in the search section. the people link.
Here is the link I am clicking and all other search links return data except the user search.
This is what I get back
My question is do other people have this problem as well or is it just me.
My suspicion is that it has to do with the way Facebook filters by privacy after they've selected your results. Meaning graph asks for (X) results, Facebook finds (X) results that match your search, then removes those who have it in their privacy options not me be searched, and then after filtering returns what's left. This is explained on Facebook's dev blog: https://developers.facebook.com/blog/post/478/
See the following answer for clearer details: https://stackoverflow.com/a/11848002/624590
That said, it could be something else - I've noticed it's been getting especially bad in recent weeks; fewer and fewer results seem to be returned.
We've been getting empty results for type=post for periods of 1-2 hours for the past few days. I'm sure it's related to something on their end, check out my bug post here http://developers.facebook.com/bugs/456910301017301?browse=search_509b0461dc68c0151458645
I am writing an application that needs to retrieve all posts on any given facebook page. For the McDonald's page, I would use this url:
https://graph.facebook.com/McDonalds/posts?access_token=xxx&limit=5000
The problem is that first, I do not receive any posts older than 2011-11-01 and the number of posts shown is much less than 5000. This means that the limit parameter isn't working properly. I looked this up and found that it was a known bug.
Then I tried to follow the next and previous paging information provided in the end and even using that I can't get past 2011-01-24. After following the next link 2 times, an empty page comes up. The McDonalds page is much older and contains more posts. So the question is, how on earth am I supposed to retrieve older posts. Is there any workaround at all?
There is a limit on the limit. Try using since & until to extend the date params
https://graph.facebook.com/McDonalds/posts?access_token=xxx&limit=5000&since=2+years+ago&until=now
&limit=5000&since=2+years+ago&until=now
&limit=5000&since=3+years+ago&until=now
What makes up the number shown on my Like button? The number shown is
the sum of:
•The number of likes of this URL
•The number of shares of this URL
(this includes copy/pasting a link back to Facebook)
•The number of
likes and comments on stories on Facebook about this URL
•The number
of inbox messages containing this URL as an attachment.
Ok, now if user A likes something, and then user A shares the URL, will I have 2 likes displayed near the button? Or each user can only be counted once
Thanks, I try to understand this because I need to write an app around it
Facebook have a pretty good guide and API for this if you do want to make use of it.
http://developers.facebook.com/docs/reference/plugins/like/
As far as the process goes, this explanation is better than anything I could come up with. But the long and short of it is, the more people who click on it independently, the more it will increment (See below). Therefore in your example user A likes it (+1), he shares it but only when his friend clicks like when it increment again.
http://www.adsforfacebook.com/the-facebook-like-button.php