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

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

问题描述

如何使用图形 API 在墙贴中张贴符号(例如 ©)?Html 实体(例如 ©)不会在 Facebook 中解析.

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

推荐答案

所有大文本字段都是utf-8,使用实际的字符来表示它是U+00A9

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

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

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

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

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

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

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