douyue8685 2011-11-12 15:50
浏览 667

Facebook使用API​​发布到墙上:我发布了中文消息,但没有一个中文字符正确显示

I use PHP language to post Chinese message to my Facebook wall, but the message did't show on wall successfully — the message is garbled.

Please see code below; the PHP page's encoding is UTF-8:

function posttofriend($facebook,$friends){
     $facebook->api('/me/feed', 'POST',
                       array(
                       'message' =>'2012光棍節快樂',
                       'name' => 'I am tiger.',
                       'link' => 'http://www.example.com',  
                       'description'=>'光棍節到了,每逢此時倍思春,朋友安慰拼啤酒,父母親戚忙說媒, 被怕今年守空房,將來必定孫滿堂!今年過節不收禮,收禮只收女朋友',
                       'picture'=>'http://www.example.com/single.jpg'
    )); 

}

Now I can see the messages on my wall, but it looks like this:

2012�������옷!
I am tiger.
www.example.com
���������ˣ�ÿ���˕r��˼�������Ѱ�οƴơ�ƣ���ĸ�H��æ�fý�� ���½����ؿշ��������ض��O�M�ã������^�����նY���նYֻ��Ů����
  • 写回答

1条回答 默认 最新

  • dpd20130 2011-11-13 14:46
    关注

    This could be what you need, not an expert on encoding but PHP iconv page this is a way to change the coding, also, did you use existing code or make it all yourself? make sure it is not restricting the encoding somewhere else (in the API for example).

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP