Ben şu anda garip bir sorun ile karşı karşıya ki ...
Ben ancak dönen dize garip olabilir ki, benim App kullanıcıları hakkında bazı bilgileri toplamak için Facebook API kullanmaya çalışıyorum ..
İşte ne var:
$params = array("method" => "fql.query",
"query" => "SELECT first_name, last_name FROM user WHERE uid = $this->userId",
"callback" => null);
$result = json_decode($oFbSmarty->getFacebookApi()->api($params));
$this->setFirstName($result->first_name);
$this->setLastname($result->last_name);
var_dump($result);
Ve burada var_dump sonucudur:
string 'null([{"first_name":"Alexandre","last_name":"\u30b4\u30c7\u3093\u30b7\u30aa"}]);' (length=80)
Did someone ever face this ? I can't understand why there is a "null" writtent in the returning string...
Teşekkürler!
EDIT : Well... Actually it's worse than what I thought =/ the "null" part of the response string is here because I didn't fill the "callback" part of the params but put null instead. Doing that makes facebook api automatically return an ready-to-execute string, which means : If I had type "sayPlop" as callback function, returned string would have been =>
"sayPlop(......)"
Bunu yapmak için facebook wan't yoksa Yani, sadece "geri" parametresini belirtmek yok, o (Facebook PHP SDK kaynak kodu) optionnal bulunuyor.
Teşekkürler!