twitterlibphp - hiç takip edemez

1 Cevap php

Bu kesinlikle beni deli ediyor. Ben twitterlibphp kullanarak benim durumunuzu güncelleyebilir ve takipçileri alabilirim, şu vb ama ne olursa olsun ben ne $ o-> takip (twitter_id) sadece işe yaramaz. Bu yanıt

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <request>/notifications/follow.xml</request>
  <error>There was a problem following the specified user.</error>
</hash>

Ben, bazı googleling yapılan kütüphane kaynak aracılığıyla okumak ve ben yanlış yapıyorum yeryüzünde ne göremiyorum ettik. Eğer Londra alanında ise ne oluyor biliyor musun, ben muhtemelen sana bir bira bardağı satın alacak ... kod oldukça basittir:

$twitter = new Twitter($username, $password);
$xml = $twitter->getFriendIDs(array('user'=>$user));
$output = simplexml_load_string($xml);
foreach($output->id as $id) {
   echo $twitter->follow($id);
}

(The $user var just comes from a textbox on a form - all that works fine and the foreach loops over the ID's)

Ama zar. Herkes aynı sorunu olan veya aptalca bir şey yapıyorum? Ben de) önceden ama yine aynı yararsızdır hata ($ twitter-> verifyCredentials çalışan denedim. I rastgele bir (var olmayan) hesabına koyarsanız o zaman o kullanıcı yüzden onun tür çalıştığını biliyor bulunamadığını söylüyor.

Şerefe!

1 Cevap

Eh, ben tidbit biraz daha googling sonra aşağıdaki bulundu:

follow

Enables notifications for updates from the specified user to the authenticating user. This method requires the authenticated user to already be friends with the specified user otherwise the error "there was a problem following the specified user" will be returned.

Umarım izleyin $ o-> createFriendship ($ id) çağırıyor ve çalışacak :) Ben docs örnekleri ya da daha belirgin hayret şu değilim ...