我在 index.php 文件中有一个代码,如下所示:
$ret_obj = $facebook->api('/me/vanlelu:cook?food=http://fabubu.com/MKK/exam/cookie1.php', 'post',);
还有一个文件 cookie1.php。
它们都运行良好(可以将活动发布到测试者帐户墙上)。
但是,我想知道是否有任何方法可以将参数发送到 cookie1.php。
我已经尝试过,但它不起作用:
$ret_obj = $facebook->api('/me/vanlelu:cook?food=http://fabubu.com/MKK/exam/cookie1.php?para=123456', 'post',);
请帮忙....
更新:
已找到如下解决方案:
$ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?id=1234678'));
现在,文件'cookie1.php'可以通过值'1234678'来$_GET['id']。
但是当我更改值“1234678”时,即使我更改参数,此 api 命令也无法正常工作。
不工作: $ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?id=12346788888888888888'));
不工作: $ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?iddddddddddd=1234678'));
看来 facebook open graph 准确地记住了我的参数及其值。当我更改其中之一时,它出现错误。
您可以制作一个页面并尝试我提供的代码吗?
I have a code in index.php file like below:
$ret_obj = $facebook->api('/me/vanlelu:cook?food=http://fabubu.com/MKK/exam/cookie1.php', 'post',);
And a file cookie1.php.
They are all working well (can post activity to wall of tester account).
But, i wondering is there any way to send parameters to cookie1.php.
I have tryed this but its not working:
$ret_obj = $facebook->api('/me/vanlelu:cook?food=http://fabubu.com/MKK/exam/cookie1.php?para=123456', 'post',);
Please help....
Updated:
have find one solution like below:
$ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?id=1234678'));
Now, the file 'cookie1.php' can $_GET['id'] by value '1234678'.
But when i change the value '1234678', this api command not work well, even i change parameter.
Not working: $ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?id=1234678888888888888'));
Not working: $ret_obj = $facebook->api('/me/vanlelu:cook', 'post',array('food' => 'http://fabubu.com/MKK/exam/cookie1.php?iddddddddddd=1234678'));
It seem facebook open graph remember exactly my parameter and its value. When i change one of them, its got error.
Could you make a page and try the code I gave?
发布评论
评论(1)
试试这个,看看是否有效
Try this and see if it works