ThaiSEOBoard.com

พัฒนาเว็บไซต์ => Programming => ข้อความที่เริ่มโดย: fogza ที่ 10 พฤษภาคม 2012, 19:00:49



หัวข้อ: app facebook มีปัญหาตอน redirect uri ครับ ช่วยแนะนำที
เริ่มหัวข้อโดย: fogza ที่ 10 พฤษภาคม 2012, 19:00:49
นี้โค้ดตอนที่จะไปหน้า login ครับ
โค๊ด:
$login_url = $facebook->getLoginUrl(array(
'scope' => 'email, publish_stream, photo_upload',
'redirect_uri' => $config['my_url'];
));
echo '<script>top.location.href="'.$login_url.'";</script>';
แล้วพารามิเตอร์ที่ชื่อ redirect_uri ผมดูจากตัวนี OAuth Dialog (https://developers.facebook.com/docs/reference/dialogs/oauth/)
ตอนนี้ทำเป็น page tab อยู่ ในเอกสารเค้าก็แนะนำแบบนี้
อ้างถึง
The URL to redirect to after the user clicks a button in the dialog. The URL you specify must be a URL of with the same Base Domain as specified in your app's settings, a Canvas URL of the form https://apps.facebook.com/YOUR_APP_NAMESPACE or a Page Tab URL of the form https://www.facebook.com/PAGE_USERNAME/app_YOUR_APP_ID

ซึ่งผมก็ใส่ตามตัวอย่างคือ https : //www.facebook.com/xxx/app_123456xx
แต่เวลา redirect ไปมันดันฟ้อง
An error occurred with xxx. Please try again later.
เป็นเพราะอะไรเอ๋ย? ช่วยแนะนำด้วยครับ  :wanwan017: