How to get the friends list by the date they added?
Or How long two users are friends. I have seen some questions like this. But they are old. I don't know whether facebook have added any options for this.
I want to use graph api - php
Facebook doesn't provide any way to retrieve such information.
Related
I require 2 bit of data from my twitter account to be dynamically requested.
(1) Followers (as of this month)
(2) Total followers
I have a couple of questions regarding how to get the data & if the data is available.
For (1), is this even available? or is this something I'd need to calculate?
For (2), so far I've been pointed in the direction of the Twitter API & oAuth. Now, to me - just get the total followers for my account - logging in via oAUth & using large class libraries (PHP) seems like total overkill.
How I can get the data I require?
twitter has buttons you can simply drop on your page. this will allow you to show the follower count as well as allow people to follow you directly form whatever page you put it on.
https://dev.twitter.com/web/follow-button
There is no way to get the data you want directly.
Twitter offers an API call which will tell you how many followers you have right now - https://dev.twitter.com/rest/reference/get/users/show
It does not provide historic data via the API - such as how many followers you had at a specific date.
You have two options.
Make that API call at the start of the month and save the result somewhere - then compare your current follower number.
Take a look at https://analytics.twitter.com/user/edent/home (substitute your own name for edent) - you'll see something like this for each month:
There's no API for that data, but you might be able to screen scrape the data you want out of it. Or just manually copy & paste.
From various postings I know that the timestamp of a 'like' is stored by FB, notably from here:
https://developers.facebook.com/docs/reference/opengraph/action-type/og.likes/
But what I'm having trouble getting clear is how, given a photo that's been posted to an event, I would get all the picture's likes and the time each like was created (and of course, by who).
As far as I can tell it would have to go something like this:
Get each user invited to event.
Get each user's likes.
Check if any of the fbid's of the likes match any of the event photos' id's.
But surely step 2 would necessitate me logging in on behalf of each invited user and anyway, wouldn't the above really poll FB too much? So I am assuming my procedure is incorrect.
Could anyone tell me what the fql would be to get a photo of an event and then the users who like the photo and then the timestamp of the like?
Thanks in advance!
Short answer, you can't. The FQL or Graph API doesn't provide such information.
There are two things to differentiate in Facebook for developers:
The FQL or Graph API, which lets developers access the Facebook data (it means everything hosted on Facebook servers and saved in Facebook databases) like events, photos, videos, posts, etc.
Open Graph, which lets apps tell on Facebook what happened on the app side : we are talking about the app's own content and requests.
When trying to grab information from an event (content managed by Facebook), you are in the first case. As you can see here, here or here, likes are never described by a timestamp.
What you saw here deals with Open Graph, which can't be applied on Facebook events.
I need to get/output all tweets from a particular user that contain a certain hashtag. The Search API works, but only lets me get the most recent such tweets, and I need all of them. Can this be done using PHP or JavaScript?
The first thing that you are going to need to realize is will the server of twitter allow you to pull out everything?
Here is some information.
https://dev.twitter.com/docs/using-search
As far as I know Twitter returns tweets from around last 7 days . Other services like topsy.com and analytics.topsy.com may be helpful.
I want to follow all of a particular users followers on Twitter.
What's the best way of doing this?
I'd like to get all of their twitter usernames too.
I can program in any language really (except Lisp!)
I'd suggest you take a look at the Twitter REST API, in particular GET followers/ids.
in pseudocode:
foreach follower in competitor.followers
me.follow(follower);
next
competitors.followers can be got via GET followers/ids
you can programatically follow a user via POST friendships/create
which will return details of the user followed which will probably let you get their twitter name, if not then you can get the details of the user from their id using GET users/lookup
Have a look at Net::Twitter on CPAN.
Have a look at the API guide, esp. the section about Friends & Followers
i would like to place all my friends / followers from twitter to my webpage?
no messages or timestamps, just the pictures.
any ideas?
thanks
Have you taken a look at one of the available libraries? http://dev.twitter.com/pages/libraries#php
Here are the basic steps involved after authenticating (see other questions/tutorials for that. No sense in repeating those steps here):
Call statuses/friends to get list of your friends
Call statuses/followers to get list of your followers
Loop through lists, grabbing profile_image_url from each user
Place URI into your web page.
Edit:
As noted by abraham, the above methods are deprecated so it is recommended to use an approach that utilizes:
GET friends/ids
GET followers/ids
GET users/lookup