Twitter: follow another user's followers - php

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

Related

Is there on Instagram an official way to get photos according to hashtag but from ALL users and not only from the one related to the client id?

I know it's super easy to retrieve photos from Instagram according to a specific hashtag from your own profile (with the client id used in the connection to the library), but I could not find anything official to retrieve photos with an hashtag, independently by the users.
So, for instance, if my hashtag was test, an API grabbing a PHP object containing photos as in this link as in the following code
$o_instagram = new Instagram($s_client_id);
$o_media = $o_instagram->searchTags($s_hashtag);
Any ideas or suggestions? Thanks in advance.
have a look at the following endpoint
https://instagram.com/developer/endpoints/tags/#get_tags_media_recent
I'm not sure how it looks in their php library but in ruby is is something along the lines of Instagram_client.tag_recent_media(:tag)
It's paginated in order of most recent first

php: retrieving infos from facebook group

i'm looking for a way to code some statistics for a facebook group which displays infos like most active member, most commented post and such.
i've tried to parse the group's email-notifications, unfortunately facebook doesn't notify on each event.
so i was thinking about curling directly from the facebook group.
is there a way to do this or is it possible through the facebook api?
thanks
I think your best bet is Facebook Grap API.
Check this Graph API - Group : http://developers.facebook.com/docs/reference/api/group/
Hope this help!

getting Facebook friends list from a php server

I want to get facebook friends Id of a specific facebook user. how can i do this?
in detail : I have a server, and form a mobile I'll send a facebook id of a user to that server. accoding to that facebook id I want to get facebook ids of friends of that user. (this should do from server) please any one guide me to do that.
answer = for this we should have access token.
Sounds like facebook wouldn't like that :)
You could scan profile.php?id=&sk=friends and parse the output for the ids.
But I'm sure the habe some fancy Ajax running giving you an easier method.
Have you checked their API? https://developers.facebook.com/docs/reference/api/FriendList/
But you need permissions for that.

php, how to insert my friends avatars from twitter to my web page?

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

Getting the user_id through Foursquare Api V2

I'm working on a foursquare integration for a social good website, and I have everything working as I want it to, however I want to retrieve and store users foursquare user_id's so others can search for their friend. I've been searching all day, but I can't seem to find an end point, am I missing something? Or does this has to be done through user search? What is then best to use, as I have their email, and full name.
I am using jmathai's foursquare-async php libary. I think it should be easy but I just can't figure it out.
I've found the solution. To get an users' details you should use the end point "users/self". I had tried this before but got an error message. I think that was related to something else now.
After authenticating two lines are simply enough:
<?php
$fsObj->get("/users/self");
print_r($creds->response);
?php>
This gives an json array containing all relevant information on the user, including last checkins, name, and id. 'self' can here also be replaced by any user id you're authorized for on that moment.
For more information I'd recommend to visit Foursquare Api website

Categories