我正在尝试获取RSS提要中每个条目的entry-> id和entry-> cap:parameter->值....下面是我正在使用的代码.它正确显示id,但它没有显示值字段....请帮忙.
$url = 'http://alerts.weather.gov/cap/us.php?x=1';
$cap = simplexml_load_file($url);
foreach($cap->entry as $entry){
echo 'ID: ', $entry->id, "\n";
echo 'VTEC: ', $entry->children('cap', true)->parameter->value, "\n";
echo "<hr>";
}
Run Code Online (Sandbox Code Playgroud)
我在这里先向您的帮助表示感谢.
使用API发布时,我会收到:
https://www.facebook.com/weather.warnings/posts/329128793830700
注意事物中缺少标题,缩略图和元描述.
以下是我正在使用的代码.
$allalert = array
(
'oauth_token' => 'not pasting this thanks :P',
'message' => "New $type for $where",
'link' => $url,
);
$sendalert = $facebook->api('/125291287567922/links/','POST',$allalert);
Run Code Online (Sandbox Code Playgroud)
引用一个人如何张贴缩略图到一个网站/链接对象?它说该项目从页面本身拉出图片
想法?
php facebook facebook-wall facebook-graph-api facebook-php-sdk