开发者

How to: Publish selected article on Facebook wall at a time

开发者 https://www.devze.com 2023-04-01 18:00 出处:网络
To be specific..开发者_运维技巧. Here\'s what i\'m doing. I am getting success in posting a single article. Using the following code.

To be specific..开发者_运维技巧. Here's what i'm doing.

I am getting success in posting a single article. Using the following code.

window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');

Here "u" is the url of the article that i want to publish. so if i pass www.google.com it fetches the content and displays it in a pop up window.

now what i want to do is.

I want to publish more than one link at a time. Say select the articles from the list and then press the share button. All the selected articles should get published at a time to the my wall or to the selected page.

I tried using for loop in php but in vain.


This is not possible because it would need to popup multiple share dialogs which wont work or at least is not a good idea via the JavaScript API. It is kinda spammy and the Facebook terms of service say the user should be prompted for original text / status when sharing a link. You could have them authorize your application for publish_stream permissions and then publish several links at a time with PHP code but again you run the risk of being marked as spam.

0

精彩评论

暂无评论...
验证码 换一张
取 消