嗨,我需要在Facebook粉丝页面上发布消息
这是我的代码当我运行此代码时,我有以下错误(#200)如果access_token令牌有问题,用户还没有授权应用程序执行此操作?我该如何创建access_token
<?php
require 'facebook-php-sdk-master//src/facebook.php';
$appId = '1617691071796143';
$secret = 'd84420ccfe2fa7eecac50ca96936bb21';
$returnurl = 'lankabird.com';
$permissions = 'manage_pages, publish_stream, offline_access,read_stream';
$fb = new Facebook(array('appId'=>$appId, 'secret'=>$secret));
$fbuser = $fb->getUser();
if($fbuser){
$page_id = "1596941017191630";
$page_access_token = "";
//$page_access_token = "1617691071796143|d84420ccfe2fa7eecac50ca96936bb21";
$result = $fb->api("/me/accounts");
// loop trough all your pages and find the right one
if( !empty($result['data']) )
{
foreach($result["data"] as $page)
{
if($page["id"] == $page_id)
{
$page_access_token = $page["access_token"];
break;
}
}
}
else
{
echo "AN ERROR OCCURED: could not get the …Run Code Online (Sandbox Code Playgroud) a我有一个要为其设置颜色的元素。该规则在悬停时也应该起作用。我可以
a {
color: #color;
&:hover {
color: #color;
}
}
Run Code Online (Sandbox Code Playgroud)
它工作得很好,但我想知道是否有一种方法可以在不重复颜色规则的情况下做到这一点。