PHP Facebook SDK / Graph API - 如何在墙贴中包含符号,例如:©? [英] PHP Facebook SDK / Graph API - How do I include symbols, eg ©, in a wall post?

查看:121
本文介绍了PHP Facebook SDK / Graph API - 如何在墙贴中包含符号,例如:©?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用图形API在墙贴中发布符号(例如:©​​)?

解决方案

所有大文本字段均为utf-8(例如& copy;) ,使用用于表示它的实际字符是U + 00A9



如果您有HTML实体,您可以使用html_entity_decode()解码$ /

$ utf8_text = html_entity_decode(test© foo,ENT_COMPAT,UTF-8);


How do I post symbols (eg. ©) in a wall post using the graph api? Html entities (eg. ©) aren't parsed in facebook.

解决方案

All large text fields are utf-8, use the actual character used to represent it which is U+00A9

If you have HTML entities you can decode with html_entity_decode()

$utf8_text = html_entity_decode("test © foo", ENT_COMPAT, "UTF-8");

这篇关于PHP Facebook SDK / Graph API - 如何在墙贴中包含符号,例如:©?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆