[英]Twitter API 1.1 PHP - POST with rawurlencode()
Fairly new to the Twitter API and I'm having a problem posting to Twitter through API 1.1 using rawurlencode(). 这是Twitter API的新手,我在使用rawurlencode()通过API 1.1发布到Twitter时遇到问题。 When I tweet an apostrophe, just normally) it tweets as a HTML entity, the docs say to use urlencode to remove HTML entities.
当我鸣叫撇号时(通常是正常情况),它作为HTML实体鸣叫,文档说使用urlencode删除HTML实体。
$vinedesc = rawurlencode('Cameron doesn\'t like the Walmart playground prices... ');
$connection->post('statuses/update', array('status' => $vinedesc));
That outputs the following as a tweet, inclusive of the percentage encoding: 它将输出以下内容作为推文,包括百分比编码:
Cameron%20doesn%27t%20like%20the%20Walmart%20playground%20prices...%20
卡梅伦%20doesn%27吨%20like%第二十条%20Walmart%20playground%20prices ... 20%
How do I get this to tweet as: 我如何将其发布为:
Cameron doesn't like the Walmart playground prices...
卡梅伦不喜欢沃尔玛游乐场的价格...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.