Talk:Stream.publish

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Publishing to the Page using the page admin is not working.

I use the offline access session as a session key. That session came from a user that is admin to the facebook page;

session_key = offline access session as a session key
message = "Hello Testing";
target_id = pageid;
uid = pageid;

This call will not work.

Please file a bug and include the IDs you're trying. Thanks, Pete -- 563683308 09:41, 10 November 2009 (PST)


When target_id is set {*actor*} not dealt with correctly

When target_id is set {*actor*} is replaced with html before appearing in the feed but it is rendered as a string rather than a hyperlink to the actor's facebook page.

Hi Sarah, I just want to be clear. Are you saying that when the target_id
  • is set to {*actor*}, the doesn't get formatted correctly in the story?
  • or when the target_id is set, the {*actor*} token in the caption doesn't get formatted correctly?
Thanks, Pete -- 563683308 18:29, 29 October 2009 (PDT)

Video Link Problem

Every time I post a video link it will not show up on the facebook home page. It will only show up on my wall. Before I would post a link and would show up within seconds on the home page. Now that does not happen. I checked my link setting and they are correct. I need my links to post to FB home page so friends can comment. Other wise they can not see my video links unless they go directly to my wall. How can this be fixed?? I have been at this for days. Thanks

Please file a bug and include some sample code or a URL where we can try to reproduce the issue. Thanks, Pete (563683308 11:59, 29 April 2009 (PDT))

Targeting Multiple Users

Description

I am unclear of the current methods of targeting multiple friends with a single feed story. Is this going to be supported in the Open Stream API via stream.publish? The documentation seems to say that it will only target a single friend. How does this compare with feed.publishUserAction which takes a list of IDs?

See the following table. The top target_id param is from stream.publish, the bottom target_ids is from feed.publishUserAction.

Could someone clarify?

Parameters

RequiredNameTypeDescription
optional target_id string The ID of the user or the Page where you are publishing the content. If you specify a target_id, the post appears on the Wall of the target user, not on the Wall of the user who published the post. This mimics the action of posting on a friend's Wall on Facebook itself.
target_ids string A comma-delimited list of IDs of friends of the actor, used for stories about a direct action between the actor and the targets of his or her action. This parameter is required if one or more templates in the template bundle makes use of the {*target*} token. It should only include the IDs of friends of the actor, and it should not contain the actor's ID.

--714497440 13:55, 31 May 2009 (PDT)

What happens if the user hasn't provided the publish_stream extended permission. From what I can understand from the documentation, it should return an error code 200.

While I was testing stream.publish function with a user that has not provided the extended permission, the PHP justs exits and never returns the 200 code and doesn't continue execution.

Is this a bug ?

I spoke with one of our engineers and based on the information you provided, he thinks it could be something in your PHP environment. Can you try logging all the raw responses from the Facebook servers. If there are any errors, you should find them in there. Thanks, Pete (563683308 11:44, 3 June 2009 (PDT))


--714069965 10:47, 5 June 2009 (PDT)

I am trying to use this to no avail. I can trace my routines all the way down to the stream_publish call and then it fails. I've even used the most simple of tests and it still does not publish to my wall or home. Take a look at below - even this does not work.

$messagetest = 'Hello World';
$facebook->api_client->stream_publish($messagetest);

I've tried publishing to the forums with only one response. Is anyone else having real problems with this? Can you suggest anything?

Thanks, Sean

Hi Sean, have you prompted the user for the publish_stream extended permission? First, you need to apply for the whitelist. Otherwise, the only Facebook users that can grant your application the permission are the ones listed as developers of your app. Pete (563683308 14:05, 5 June 2009 (PDT))
Note: The publish_stream whitelist no longer applies. Pete -- 563683308 14:12, 19 November 2009 (PST)

Attachments Not Showing Up:

When I publish something from my desktop app, my attachment will not show up. The post to the wall is all correct, including the message and action links, but my attachment is not there at all. I am not getting an error code from the API when I call publish, just the standard response of all is well. Since I am not getting an error code, I have no idea where to begin debugging this. Any ideas?

Thanks, Tyler

Please file a bug and include the code for your attachment and the stream.publish call. Thanks, Pete (563683308 12:12, 6 August 2009 (PDT))

share button

How do I show the button Share on a published stream?


does description field of attachment support unicode?

I could make unicodes in description feild of the attachment make even with the utf-8 encoding of the calling page.Actual number codes are shown in feeds rather than rendered characters...is it problem in stream.publish function?

This sounds like a bug. Can you please file one? Thanks, Pete -- 563683308 11:17, 6 October 2009 (PDT)

uid variable not working?

I am able to use the following to add a status update to one of my Fan Pages: $facebook->api_client->stream_publish($message, $attachment, $action_links, $target_id);

The problem is that it defaults to me as a USER posting, instead of the default page posting.

However, when using the following code to specify that the page post as itself, it does not work: $facebook->api_client->stream_publish($message, $attachment, $action_links, $target_id, $uid);

the uid ONLY works if I leave it blank or use my personal userID, but again, this posts as my personal user instead of the page itself.

reference