php - Yii and Instagram Real time api subscription -
i trying add subscription instagram real-time api setting callback_url yii (1.1.16) driven page , everytime api calls page gets server error (500). on apache log this:
173.252.114.111 - - [14/jun/2015:10:09:35 +0000] "get /site/instagram?hub.verify_token=mytoken&hub.challenge=xxx&hub.mode=subscribe http/1.1" 500 341 "-" "python-httplib2/0.8 (gzip)"
when change callback_url php page without yii (www.mydomain.com/instagram.php) works without problems.
173.252.114.111 - - [14/jun/2015:09:53:08 +0000] "get /instagram.php?hub.verify_token=mytoken&hub.challenge=xxx&hub.mode=subscribe http/1.1" 200 200 "-" "python-httplib2/0.8 (gzip)"
the code use in controller:
public function actioninstagram() { $this->layout = false; echo $_get["hub_challenge"]; yii::app()->end(); }
does know why yii giving error?
ok, found out happening. seems instagram realtime api uses python httplib2 , not sending request headers http_accept_language , had extensions trying $_server['http_accept_language'] php giving undefined index error.
my bad!
Comments
Post a Comment