帮助推特媒体实体 [英] Help with tweet media entities
问题描述
我刚刚遇到了推文实体,我想将其添加到我的推文中!我在 API 中一遍又一遍地阅读,但我仍然无法让它工作.这就是我所拥有的:
I just came across Tweet Entities and I want to add it to my tweets! I have read over and over in the API, but I still can't get it to work. This is what I have:
$entities = array(
"media_url" => $picture_url,
"url" => $short_url,
"type" => "photo"
);
$status = $connection->post('statuses/update', array('status' => $twitterStatus, 'include_entities' => 1, 'entities' => $entities));
print_r($status)
的一部分包括:
[entities] => stdClass Object (
[user_mentions] => Array ( )
[hashtags] => Array ( )
[urls] => Array (
[0] => stdClass Object (
[url] => http://myf.la/sh/9nlex
[indices] => Array (
[0] => 6
[1] => 28
)
[expanded_url] =>
)
)
)
[retweet_count] => 0
[place] =>
[in_reply_to_user_id] =>
[in_reply_to_status_id] =>
我还需要在实体数组中添加什么?您无法添加 docs 要求您的所有内容.
What else do I have to add in my entities array? You can't add everything the docs asks you too.
我认为这是一个已知问题,因为它是一个新的 API.在此处阅读.
I think it's a known issue since it's a new API. Read here.
推荐答案
不,你不需要手动指定你的媒体(实体)——twitter 会自动提取它.
No, you don't need to specify your media (entities) manually - twitter will extract it automatically.
http://api.twitter.com/1/statuses/show/82425283357052929.xml?include_entities=1 --- 这是我最近的推文,有实体.
http://api.twitter.com/1/statuses/show/82425283357052929.xml?include_entities=1 --- here is my recent tweet, with entities.
这篇关于帮助推特媒体实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!