18

I rather expect that this might be impossible - but I was wonderring if it was possible to post a facebook status via passing in a URL.

Something to the effect of

 http://facebook.com/?status=<URL ENCODED STRING>  
1

3 Answers 3

43

Wow. Almost a full year since I asked this question.

As an FYI and for my own future reference, I did eventually discover how to do this.

 http://www.facebook.com/sharer/sharer.php?u=<url to share>&t=<message text>
 https://twitter.com/intent/tweet?text=<message>
 http://www.linkedin.com/shareArticle?mini=true&url=<url>&title=<title>&summary=<description>&source=<source>

Google plus does not have a good option to use this method in desktop, but you can use their mobile URL

 https://m.google.com/app/plus/x/?v=compose&content=<message>
7
  • 1
    the facebook URL should read u=<url to share>&t=<message text>
    – afxjzs
    Apr 26, 2012 at 20:53
  • 1
    What a boss, four useful bits in one post. You saved me from searching various developer sites looking for the right words to use on each of them. Thanks!
    – user401142
    Jun 1, 2013 at 18:13
  • 7
    Sadly, this no longer appears to work as of now. The URL is populated, but the message is not. :( Jun 26, 2013 at 14:28
  • 2
    As James mentioned, it doesn't seem to be possible to use the link above to publish text. Anybody found a workaround? I'd like to propose to my users a link and text.
    – Martin
    Aug 9, 2013 at 5:46
  • 2
    Quick and dirty fix : use &quote= rather than &t=
    – JonSG
    Dec 22, 2016 at 22:30
1

I found this solution useful also (here)

var facebook_url = 'http://www.facebook.com/sharer.php?'+
  'u='+encodeURIComponent('http://google.com/?q=bla')+
  '&amp;t='+encodeURIComponent('Some Page Title');
0

There's a builtin CURL converter in the Graph API that gets you all you need.

Not the answer you're looking for? Browse other questions tagged or ask your own question.