Facebook api贴到墙上 [英] facebook api post to wall

查看:93
本文介绍了Facebook api贴到墙上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前能够发布到用户墙上,但是我希望该帖子能够预览,因为即时发布是一个链接...

I currently am able to post to a users wall however I would like the post to give a preview since what im posting is a link...

更好地自我解释如果我要登录我的facebook帐户并复制一个链接并将其粘贴到我的墙上,它将显示一个音频播放器(所有元数据已经配置,测试并且可以工作),但是使用代码发布此链接没有显示音频播放器,而是仅显示要单击的链接.有没有办法让Facebook显示音频播放器...?

To explain myself better If i was to log into my facebook account and copy a link and paste it to my wall it displays an audio player (all the meta data is already configured, tested and working) however, using code to post this same link it doesnt show the audio player instead it only shows the link to click on. Is there a way i can make facebook display the audio player...?

这里是我用来发布的代码:

Heres the code im using to post:

$fbResult = $facebook->api( 
    '/' . $userId . '/feed/', 
    'post', 
    array('access_token' => $access_token, 'message' => $url) 
);

提前感谢您的帮助!

推荐答案

我假设您要将该URL作为message参数的一部分发布?

I’m assuming you’re posting the URL as part of your message parameter?

通过显式使用URL的link参数来执行此操作.

Do it by explicitly using the link parameter for the URL.

https://developers.facebook.com/docs/reference/api /user/#links

这篇关于Facebook api贴到墙上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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