English 中文(简体)
分享Facebook活动到我的墙壁
原标题:Share facebook event to my wall

I can t seem to get the picture of the event, and it also gives me a fatal error trying to connect to the event image.
Can I share an (already created) event (not create one, just link to it - with a picture and description) and post it to my wall?

他就是我已经拥有的:

$facebook->api( /me/feed ,  post , array(
           message  =>  event test ,
           link  =>  https://www.facebook.com/events/event id/ ,
           picture  =>  https://www.facebook.com/events/event id/ ,//produces an error
           name  =>  event test ,
           caption  =>   ,
           description  =>  event desc ,
    ));
最佳回答

这一点:

$facebook->api( /me/feed ,  post , array(
    link  =>  https://www.facebook.com/events/event id/ 
));

doesn t work? All of the other info should be available for facebook.


Edit

I have no idea why simply sharing the event does not work. Even when supplying the info, the image can not be loaded (as you wrote) with a message saying the pics served from the fb CDNs can t be shared.

我有两个可能的变通办法 为你虽然:

1) 您可以使用 api 询问事件信息, 然后发布该信息, 例如 js sdk :

FB.api("EVENT_ID", function(response) {
    FB.ui({
        method: "feed",
        link: "http://www.facebook.com/events/EVENT_ID/",
        name: response.name,
        description: response.description
    });
});

至于图像,既然您正在服务器上做,那么您就可以下载图像(https://graph.facebook.com/event_ID/picture?type=maxulation ),将其存储在您的服务器上,然后添加到文章中。

2) 根据"http://developmenters.facebook.com/docs/reference/api/event/#irevited" rel="nofollow">邀请连接活动对象 :

You can invite users to an event by issuing an HTTP POST to /EVENT_ID/invited/USER_ID. You can invite multiple users by issuing an HTTP POST to /EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3. Both of these require the create_event permission and return true if the invite is successful.

So with that you can invite the friends to the event directly.
I know it s not the same, but it might be better than nothing, depending on what you need this for.


I recommend that you open a bug report on the Bugs system.

问题回答

尝试使用 /me/links 连接代替 link 作为Facebook事件链接,并尝试使用 message 作为您想要添加的描述

"https://i.sstatic.net/dkAnm.png" alt="A链接共享"/ >

"https://i.sstatic.net/gF25l.png" alt="在“ 线上” / >

在这里,它与内置份额比较

"https://i.sstatic.net/UjGhW.png" alt="比较两者,显示相同的演示文稿"/"

关于/links 的更多信息,见http://developers.facebook.com/docs/reference/api/user/#links

FYI /me/links 有一个已知的错误,其中有一些参数是它应该接受的。 Afaik,FB尽管最初去年报告过,但仍未修好它,今年又在1月再次报告。虽然错误报告针对页面发布,但可能与你面临的问题有关:

< a href=" "https:// developmenters.facebook.com/bugs/2301789870765" rel="nofollow" >Bug链接

我试图做类似的事情 和你一样,它从一开始就是一个皇家 PITA, 我仍然没有管理它 经过很多努力。祝你好运!





相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...