I want to send friend requ开发者_Python百科est to multiple facebook user from my web-app.
I know that sending request to sigle user can be done using this link: http://www.facebook.com/addfriend.php?id=PROFILE_ID
Is there a way i can do that for multiple user???
Let's say you have an array of users. Loop through those users and call the addfriend.php url.
foreach ($users as $user) {
file_get_contents('http://www.facebook.com/addfriend.php?id=' . $user->id);
}
Or something like that.
I'm using file_get_contents here, but you can use whatever you like ofcourse.
精彩评论