facebook php sdk不工作为什么? [英] facebook php sdk does not work. why?
本文介绍了facebook php sdk不工作为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建Facebook应用程序
I create facebook app
require_once("facebook.php");
$config = array();
$config[‘appId’] = 'myid';
$config[‘secret’] = 'mysecret';
$config[‘fileUpload’] = false; // optional
$facebook = new Facebook($config);
$uid = $facebook->getUser();
echo $uid;
但它不起作用。我的应用页面上看不到任何内容!为什么?
but it does not work. I see nothing on my app page! Why?
推荐答案
您可能会看不到任何原因。可能是$ uid不是字符串,但是一个对象和PHP正在抛出一个错误。您可以打开错误报告并找到错误。
也可能值得在uid上执行var_dump或print_r,uid可能不是您期望的
you may see nothing for a number of reason. One might be that $uid is not a string, but an object and php is throwing an error. You could turn error reporting on and find the error. also it might be worthwhile doing a var_dump or print_r on uid, uid might not be what you expect
这篇关于facebook php sdk不工作为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文