On Facebook share URL, give option to user to choose image - facebook

I don't see the answer I'm looking for, so hopefully someone can help.
I have a PHP script, which displays data from an SQL database. The dynamic elements are pulled in, essentially showing details of a job listing. On this page, I have a Facebook share URL.
Example:
<a title="Post on Facebook"
href="http://www.facebook.com/share.php?u=http://www.mywebsite.com/joblisting/details.php?job_id=1345488636.3750">
POST ON FACEBOOK
</a>
When the user clicks that link, they get the Facebook page to post this to their Facebook page. The page they are on pre-populates with my page title, page description, etc.
And if I have an image on my page, that becomes the default thumbnail image for the FB post. I also set a defualt Facebook image in my metatag, and that works too. I also added up to 10 other images on my page, so that the user could choose from 1 of 10 images as the default thumbnail. But...
I wanted to be able to let the user choose a thumbnail image from their desktop. Is this possible?

The image that's used in the Share dialog needs to exist somewhere on the web before the dialog is invoked, so you'd need to allow the user to upload it somewhere before popping the dialog in order to do what you're suggesting.

Related

How Facebook is redirecting to another website and from there posting an image in user timeline

While going through my friends posts in Facebook Application I have observed that some images with a question like "which characters suits to you in 'some movie name' movie". whenever I click on that image it is redirecting me to their website(Ex:- Brochill) and asking me to login with Facebook credentials.
Once I do login successfully It is redirecting to a page where it is going to show me an image with a character name and image of the selected movie. whenever I click on post on my Facebook wall it is automatically redirecting to my Facebook application and posting that image automatically.
I wanted to know how exactly the internal functionality is working.
My Observations:-
For the website which we are redirecting we need to login first.
without login it will not work.
It will create a same image whenever I tried to click on the image in the Facebook App It is giving me the old generated image. I think they are maintaining the user details with generated images.
Any Ideas?

Facebook share button issue

I added the facebook share button within an email body (.htm). The purpose of the button is to share the photo a user received in his email. When the button is clicked, a new tab opens with the "Write a message" area to share on facebook.
The problem is that once "Share Link" button is clicked nothing happens - no confirmation, no redirect, BUT the link is actually posted on Facebook (so the end user would not know the message has been shared unless they check their Facebook while all confused). Here is the code for the button:
<a title="Share this photo"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=%PHOTO_LINK%.jpg (dynamically populated link)
&p[title]=Check out my pic!"
target="_blank">
<img src="someplace.png"
alt="Share on Facebook" height="50" width="50" />
</a>
I have tried using meta tags (title/description/url and the main namespace tag), but they are not picked up when shared (title/description is a bunch of random characters). Is this behaviour normal for share buttons of this sort, is it a bug or am I doing something wrong?
Thanks in advance
To fix this, put target="_blank" in the <a> tag.
You won't be able to share a photo within an email as it would mean sharing the URL to the email itself (which users won't have access to).
Instead, you should put the image on a website and use OpenGraph markup to give it a correct title, description, and thumbnail image. And then share the URL to this image on Facebook. You can still embed the image in the email, but the sharing and image need to be external from the email.
A lot has happened since 2012. There are now two API's a user may choose from when sharing on Facebook: 1) Sharer, and 2) Share Dialog.
Sharer: This will require confirmation of the user posting their content, and this will then get you what you want. However, Sharer only supports the url parameter now. There is basically no way to share any other parameter. Official Facebook Developer Docs: Share Button. And: Official Facebook Discontinuation of Sharer Non-URL Args Post.
Share Dialog: You will need to configure an App with Facebook, authenticate, and then to solve your problem, you'll want to set one of these params...
display : Set this to page (the default), or one of the other options, to determine how your share dialog displays.
redirect_uri : If you don't like how Facebook decides to interpret your display params, you can just redirect after sharing to some page on your site that says, "Post successfully shared! link to post" or some such.
Hope this helps someone.

Facebook Like button: how it choose image to display

I've put "Like" button to my web site.
In general it works fine, the only problem is when user add some text and publish it in the profile his post contains image. And the image chosen is not something meaningful, it is one of the menu items that doesn't really makes any sense.
Could you please advise how to tip to the facebook the better image? I didn't see any information about that in their documentation (http://developers.facebook.com/docs/reference/plugins/like/), probably I've overlooked that?
Thank you.
P.S. Pretty similar question: is there any way to suggest for user text he wants to share (that will appear once user click "Like" button)?
You can specify image by adding Open Graph tags to head section each page containing the "Like" button.
You can specify an image URL in og:image tag, and Facebook will use this image in the user's profile entry.
The same goes with
og:title - this will be the title of the new entry on user's profile.
og:site_name (will be displayed as grey text under title) etc.
See http://developers.facebook.com/docs/reference/plugins/like/ and
http://developers.facebook.com/docs/opengraphprotocol/
for detailed description.
You can use the Open Graph tags for both versions of the "like" button - iframe and XFBML.
Once you add the tags to your pages you can use http://developers.facebook.com/tools/debug to check if they are OK.

Like button for Facebook page shows generic Facebook description in News Feed

I want a Like button on my web site that Likes my Facebook profile (rather than my web page), so that when a user clicks it they subscribe to my Facebook posts.
I've created the Like button using the tool at https://developers.facebook.com/docs/reference/plugins/like/
Further down that page there is an FAQ entry:
Can I link the Like button to my Facebook page?
Yes. Simply specify the URL of your Facebook page in the href
parameter of the button.
So, I've edited the href parameter to point to my Facebook page. eg:
https://www.facebook.com/myfacebookid
When a user clicks the Like button it has the desired effect. The user ends up having Liked my Facebook page. This is easily verified by the user going to my Facebook profile and checking that the Like button has changed to Liked.
But. When the user clicks the Like button, and entry appears in their News Feed with a generic Facebook description. ie:
Facebook is a social utility that connects people with friends and
others who work, study and live around them. People use Facebook to
keep up with friends, upload an unlimited number of photos, post links
and videos, and learn more about the people they meet.
I don't want a generic post about Facebook to appear. I want the description to relate to my Facebook account and/or web site.
Normally, I could modify this behavior with the Opengraph og: description tag, but as the page in the href is a Facebook page and not my own, I can't control the Opengraph tags.
I'm pretty sure that this was working okay before I enabled timeline for my account, so maybe this is a timeline bug?
So, how do I add a Like button which a) Likes my Facebook profile rather than one of my own web pages, and b) Posts a description of my Facebook profile rather than give a generic Facbook description?
Are all your fields in the info part of your page filled in, and/or completed? I just tested your theory and it seemed to work as expected, only thing is I know all fields in "info" are filled it. Give that a try.
This may happen if you have filled invalid/incomplete/wrong og tags in past and later changed them. Facebook's cache creates problem sometime.
Try putting all the entries (i.e. all og tags) and then debug them here http://developers.facebook.com/tools/debug. This debugger gives a detailed info about the url with og tags and also clears the cache for you.
This should solve the problem.
You have 3 important fields that used on page opengraph: Name,Description,Profile Image.
They are used when some one post your link on Facebook, or Google or some else web service that handle opengraph.
Actually, the suggested answers currently do not work and there is an open bug / ticket on Facebook for it. Up to now, there's no fix.
The problem is that you can not use simply https://www.facebook.com/myfacebookid. You should copy and paste the exact page URL. If you have a low number of likes it would look something like https://www.facebook.com/pages/[YourPageName]/[Your page Id]/, and this is the URL that you should use at this point.
If it does not work, try also https://www.facebook.com/[YourPageName]/[Your page Id]/.
In short, copy-paste the URL, do not type it manually.

Hyperlink on a Picture

I have a picture with a hyperlink, however, when I download the picture to Facebook the hyperlink does not work. Can you not put a hyperlink on a picture? I would like it if people open the picture, they will be able to click on the picture and it take them to a website.
You'll just need to wrap the image with an pointing it to the site where your sharing it on. However, if your using FaceBook to host the image, then you'll be using the API of FaceBook and won't have control over what happens when a user clicks on the image. Maybe just share the link in the description??