Share on facebook with chrome extension

I want to share the current open tab url on facebook wall with chrome extension. For this, I used to use https://facebook.com/share.php , which first gave me the login parameter, and then exchanged the field.

Since facebook has deprecated this method, how can I post / share on my wall with chrome extension? FB.api is another option, but for this I may have to authenticate with facebook first. How can I achieve this from chrome expansion?

+1
source share
3 answers

You can use the feed dialog, find more details here

This is a direct URL.

https://www.facebook.com/dialog/feed? app_id=458358780877780& link=https://developers.facebook.com/docs/reference/dialogs/& picture=http://fbrell.com/f8.jpg& name=Facebook%20Dialogs& caption=Reference%20Documentation& description=Using%20Dialogs%20to%20interact%20with%20users.& redirect_uri=https://mighty-lowlands-6381.herokuapp.com/ 
+3
source

The accepted answer does not work for me.

Found another way to share on facebook ( jsfiddle ):

 https://www.facebook.com/sharer/sharer.php?u={url} 

There is a tool that generates a sharing dialog: https://apps.lazza.dk/facebook/ (Β© Has Facebook.php changed to no longer accept detailed parameters? ), Here is a reverse engineering example:

 https://www.facebook.com/sharer/sharer.php ?u=${url} &picture=${pictureUrl} &title=${title} &caption=${caption} &quote=${quote} &description=${description} 

This link creates a sharing dialog, for example:

Quote sharing

For the bigger picture, we should omit the quote:

Large image sharing

+1
source

Here's another way: bookmark and set the name for "Share on Facebook" and the URL:

 javascript:var d=document,f='http://www.facebook.com/share',l=d.location,e=encodeURIComponent,p='.php?src=bm&v=4&i=1274665734&u='+e(l.href)+'&t='+e(d.title);1;try{if (!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z) {a=function() {if (!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if (/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0) 

Note. I did not invent this method, and I don’t remember where I got it from, but it works great for both Chrome and Firefox. (I have not tried this in other browsers.)

EDIT: I found the source: https://www.facebook.com/share_options.php On this page, just drag the Share to Facebook icon on the bookmarks bar.

0
source

All Articles