Get number of twitter shares by url - php

I have a question about twitter counting. Everything is so blury about this.
Simply:
I have website with dynamic pages, button for tweet, people go to page, press tweet, it shows on they twitter, count on my page increase. but I need also on my backend to call to twitter and ask them how many shares i have already and count with that.
It is concept for voting. People by sharing to facebook and twitter are voting for the website, so i need to take those votes and count them together. Please dont recommend me scripts like "sharecount" i tried and it has a lot of issues, and its not reliable.
I can get easily likes from facebook but i dont seems to get how to get the number of shares from twitter.
Also if anyone can help me, is there a way to get shares from unique users ? I noticed that if i tweet the site 50 times, the counter is 50. I would like it to count 50 tweets from 1 user as 1.
Thanks for help!

See the private API method http://urls.api.twitter.com/1/urls/count.json?url=

Related

how to count no of likes,shares and reviews of a facebook page in php

I have tried to get number of likes and shares of a facebook page in php. But I didn't get any proper solution for it.Please anyone can suggest me full code to get all these stuffs.Thanks in advance.
Using the Graph API you can retrieve the number of likes for a Facebook page.
https://developers.facebook.com/docs/graph-api/reference/page
In terms of "shares" as in how many times the page has been sent to another person by another it would depend on the tool you are using to share the page; Facebook doesn't track this itself within it's Graph API.
If you have a link on your page that says "Share our Facebook page" you could create something in ajax that would increment a counter on how many times someone had clicked that link, or if you are using a specific plugin to share the page you might be able to use their API to get some sort of count.
Again there is very little information on this question as to the problem you are experiencing, but hopefully this will give you the jumping off point to get started.

Facebook page post share count per user

I'm trying to recreate a Facebook page tab application similar to this one: https://www.facebook.com/andrewchristian/app_118098318208381
Up to now, using FQL, I plan on fetching user data (if the user liked/commented on a post) and display a list with an order based on their activity. It will be a cron running once or twice a day. The only thing I'm missing is a way to know if the user has shared any of the page's posts.
I've been digging around in the FQL tables (the link is for the stream table) for any clues but I cannot find anything to work with. Has anyone done something similar? Any other ideas on how I can fetch such information? This has to work as "per user", I'm not not interested in the total count of shares on a post.
P.S.: If there is something that counts a user's total likes/comments/shares on a Facebook Page, I'd really like to know about that as it would make my life much easier, I'm open to any suggestion!
Thanks in advance!

Count Facebook-users with a certain name

I want to check a name with Facebook to display how many users are on Facebook (generally) with the same name. I'ld like to display this on my website.
I know that it's possible, I see on different websites this information:
+/- 14225 Zoltan's on Facebook (Position #4454)
But I have no idea were I can find a script for this. I searched everywere but couldn't find anything. Is there someone who can help me, please?
The most near results that you can using the Graph API is using-
http://graph.facebook.com/search?q=jeroen&type=user
(needs a valid access_token)

Need suggestions about a Facebook analytics system

I'm working on a small project which will basically do some Facebook stuff and pulls the new daily like for client's pages into my database so I could show them my own charts with their page statistics. Now first of all, I have made a cURL request running with a cron-job and scraping their Total Likes every day using the simple graph-api URL.
The problem is with New Daily Likes / Daily unlikes because, based on my little research, there is no way to access these without having a valid access_token and doing today total - yesterday total is not exactly correct, because it will confuse the new likes with the people who disliked this and it will be a total mess.
I don't want to force my clients to go to Facebook and get an access token to access the insights for 2 reasons: 1) I want it to be totally non-technical so they will not need to mess too much with tokens and stuff outside of my panel. 2) I bet some of them will have problems with storing their access tokens in my database.
How do I do that so they will only need to give me the ID of their page (that's how it currently works and I don't want to change it)?
Basically, there are 2 ways to get Likes information, one is to query public information, like:
http://graph.facebook.com/cocacola
And the other one is to query for page insights information, for which you need access tokens with right permissions.
If you don't want your clients to install your Facebook application with permissions (and with that, give you access token), your only option is to query public information.
As you've noticed, that gives you a problem, since each day "likes" gain is "mashed up" from users adding likes and removing likes, and thus, you dont have precise information about how many users liked and disliked every day. One way would be to query the information, lets say per hour, or even 5 minutes, and store that information. Then, by simple math, you can see how many users liked and disliked the page. It is still not totaly precise, but its alot more valid than "daily information".

Retrieve complete Twitter timeline

we are working on a PHP webservice which is intended to retrieve a user's twitter timeline.
Now comes the problem, this is the URL we use: "http://api.twitter.com/1/statuses/user_timeline/$user.json?count=$num&include_rts=1 where $user is the user (^_^) and count the number of tweets to retrieve but it only shows me the tweets generated by the user or the ones reteeted by him.
I need ALL tweets that appear on his timeline, means the one he tweets and the ones people he is following tweets.
Is there any parametermissing in the URL above or do I have to use another method instead?
Thanks in adavance.
I answered a very similar question, it would apply in your case too..
use Twitter Counter as Twitter only supplies you with numbered I.D's rather then detailed info about followers.
Counting a Group of Twitter Users' Followers
MyAccount > MyFollowersAccount > followers_count
What I would do is this,
run the Twitter API method GET followers/ids
https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi
to get the ID's of the followers of screenname X
and then switch over to Twitter Counter which will give you a more
detailed list and information about the followers, followers
specifically. Also, this could be a way to split up the two calls so
you won't be blocked by a rate limit problem on one end.
http://twittercounter.com/pages/api?ref=footer

Categories