Pages: 1
Hi All,
I am using following code :
<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
<script type="text/javascript">
function publish2FB()
{
var message = 'This is the status update';
var attachment = {'name':'title text','href':'http://mysite.com','href':'http://mysite.com', 'caption':'Source:fb.myTestApp','description':'tempor. Proin vitae lectus ut massa sagittis congue. Phasellus feugiat vehicula ultricies. Integer neque ante, ullamcorper at aliquet eu, ultricies quis metus. Nullam placerat congue enim, quis cursus dui pellentesque vel.','media': [{'type': 'video', 'video_src': 'http://www.youtube.com/watch?v=7nfsiDFOYL0', 'preview_img':'http://i4.ytimg.com/vi/7nfsiDFOYL0/default.jpg', 'video_link': 'http://www.thestranger.co.nr','video_title': 'Smack That'}]};
FB.Connect.streamPublish(message, attachment, null,'',null,null,true,'page_id');
}
</script>
<fb:login-button onlogin="publish2FB()" ></fb:login-button>
<script type="text/javascript">
FB.init("API_key", "xd_receiver.htm");
</script>
</body>I have accepted the publish_stream permission for the Page. But still when I want publish to my page's stream I get the prompt dialog before publishing.
I want to publish a feed story to the Page without the prompt dialog. Please anybody help.
Offline
nebody to answer what i am missing actually ?! Please. I'm so stuck :-S
Offline
Yes I can publish to the Page feed now.
But I want to publish on behalf of the Page and Without Prompt dialog !!
Please somebody reply something :-S
Offline
w're u were wrong? still i cant post my feed.. is this code correct ?
Offline
before you can publish automatically to stream you have to prompt for extended_permission (publish_stream permission)
see there
http://wiki.developers.facebook.com/ind … ermissions
Offline
Hi donachy,
Thanks for your reply.
I did prompt for the extended permission. And when I check the application setting of the my application at my page I do see that it has the permission to publish to stream.
Can you please tell me what actually I'm missing or can you share some working example code ?
Thanks again.
Hems,
Hems wrote:
w're u were wrong? still i cant post my feed.. is this code correct ?
Please check the demo I'm checking at the following url. as it is JS you shud be able to see the source code:
http://ourgroup.isgreat.org/fbTest/testConnect.html
Last edited by theStranger (2009-11-03 06:09:49)
Offline
sorry but I don't use FB.Connect, I have a canvas application, I've just assumed that could be the problem...
Offline
Did you figure out the issue, theStranger? I'm experiencing a very similar issue.
Offline
simpletext,
I'm afraid,nope I din get anyway out yet :-S Please let me know if you got anything. However. I'll be posting if I I can manage it.
Offline
I have the same problem as everybody else. Is there a bug open for this yet?
Offline
Hi all,
As some of you may have noticed, if you perform the auto streamPublish immediately after getting the publish_stream permission from the user (e.g. in the callback of showPermissionDialog), you need to refresh the JS session first to allow JS to see thisnew permission.
Example:
function permissionHandler(permStr) {
var perms = permStr.split(',');
for (var i=0; i<perms.length; i++) {
if (perms[i] == 'publish_stream') {
FB.Connect.forceSessionRefresh(function() {
var attachment = /* your stuff here */;
FB.Connect.streamPublish('hello world', attachment, null, null, null, null, true, null);
});
}
}
}Hope that helps you.
Offline
having the same problem... but did u make sure u have all arguments in correct order - i had that prob, plus if u don't define stream_callback func, it throws an error
function stream_callback(){}
var attachment = {'media': [{'type':'image',
'src':'http://bit.ly/AJTnf',
'href':'http://bit.ly/hifZk'}]};
FB.Connect.streamPublish("hello from facebook connect!, with auto-permissions", attachment, null, null, "", stream_callback, true, null);
This is how http://developers.facebook.com/docs/?u= … eamPublish defines it:
streamPublish(String user_message, Object attachment, Object action_links, String target_id, String user_message_prompt, Function callback, Boolean auto_publish, String actor_id)
My problem is that the request is never sent/response-received... not sure why
Offline
hello,
I am completely new to FB development.Can anybody help me how to use FB.ConneCt.streamPublish.
I am creating an iphone application.I want that my user is playing the game on iphone and he wants to put his or her highest score on his or her wall on Facebook or on his or her friends wall in Facebook.Currently the problem I am facing is that after the login I have to click the _feedbutton and then i get a text book where I have to type what is to be publish on my wall.But I don't want that.I want that after login it should directly give me the publish screen.I am using the same sample code which is given under the Facebook developer section.I have also succeed in creating the extended permission that is publish_stream.Please Help me.PLEASE....Thanks in advance.
Offline
Pages: 1