Share photos using an application - facebook

i'm making a web portfolio and i wanna add a button to share a photo on user wall, so when X user click "Share image" it should share the image selected.
I get it using Dialogs, but the image is publish in a very small size and if other wants to see it in full size they've to enter my website.
Don't you know how to make a script so when the user click "Share Image" it works at least similar as when you share a photo inside facebook (like when you share one of your images or something like that) ?
PS: Sorry for my english, i'm not english native and i know i don't speak it very well.
Thanks.

You cannot use Dialogs to upload photos to the user's profile. For this, you will have to use the PHP (or similar SDK) and POST data to the API. This blog post will help.

Related

Posting text and image to my Facebook 'wall' from Codenameone app

What I am trying to do from my Codenameone app, in Eclipse, is to send a piece of Text and an Image to my Facebook wall. Simple (or is it). Can anyone explain to me how to achieve this in Java (in a CN1 app) please?
I am not wanting the user to login to facebook in my app. Instead, to achieve this in the same way that many mainstream apps do this (eg. BBC News app) where they use the Facebook app, that is already installed on the device, in the list of destinations to Share to, which resolves the FaceBook connection issue. If the user doesn't have FB app installed then I will not make this available to them.
I have read articles online but they are a number of years old (post out of date) or make use of tokens (for which I have little knowledge how to implement).
Assuming the above is possible then any information on formatting the destination post would be a real plus.
Many thanks in advance.
Answered by #WizKid, #Diamond, #Shai Almog.
I have put a ShareButton component on my screen allowing the user share with FB, Twitter etc.
ShareButton sb = new ShareButton();
sb.setUIID("Label");
sb.getAllStyles().setAlignment(Component.TOP);
String imageFile = FileSystemStorage.getInstance().getAppHomePath() + getMyFileName();
sb.setImageToShare(imageFile, "image/png");
sb.setTextToShare("My Text to share");
This works nicely, although its doesn't put the text from my setTextToShare() into FB but does Twitter and Email. Strange. Photo goes up and it does allow me to type my own text in.

Facebook ui share method displays small thumbs when shared from mobile

I'm using FB.ui share method to share links on Facebook.I have to use this method since I want to tag friends on my post.
window.open(
'https://www.facebook.com/v2.1/dialog/share?app_id=&display=popup&redirect_uri='+encodeURIComponent(REDIRECT_URL)+'url='+encodeURIComponent(SHARE_LINK),
'facebook-share-dialog',
'width=750,height=393');
Even though my og:image has the right size, i.e 1200x630px when shared on Facebook the shared link is displayed with small thumb.
When I change the method to FEED dialog or SHARE using facebook/...//sharer.php URL large thumb is shown for the shared link on Facebook.
window.open(
'https://www.facebook.com/v2.2/dialog/feed?app_id=&display=popup&redirect_uri='+encodeURIComponent(REDIRECT_URL)+'&link='+encodeURIComponent(''),
'facebook-share-dialog',
'width=750,height=393');
return false;"
IS there any additional parameter that I need to add TO https://www.facebook.com/v2.1/dialog/share so my image is displayed correctly I.E with large thumb on Facebook?
Thanks.
I had the exactly same issue. I was using "/sharer/sharer" for sharing links and everything was working well. And when I try to use the "/v2.1//dialog/share" I noticed that on desktop, images are big (1200 width) but on mobile (web and iOS App), the share is displayed as a small square.
I think it is because when you use "/v2.1/dialog/share", Facebook assume you share a story through your Facebook App and on mobile UI, story are displayed with small square image :-(
When you use the /sharer/sharer, there is no association with your app and Facebook will just assume user share a link in his feed. And it is the only type of share that display large image on all platform (desktop, mobile and iOS app)
So basically I don't think you can force FB to display large image :-(.
The Facebook doc say that providing big image will result in big image display but it looks like it is only the case for desktop. And for mobile only link status are displayed as big image.

Facebook Unity Upload Image w/ Facebook Dialog

We currently allow users to post images to their FB wall by using FB.Feed() with a URL of existing images on our CDN and we can include a description, a link, caption, etc.. The interface for posting the image is great because it's built by Facebook and gives the ability to choose who sees it (friends, me only, etc.).
We now want to allow users the ability to post images of their creations in the game, which obviously can't be pre-taken images on our CDN, and we'd prefer avoiding the route of uploading all the images to our CDN then using FB.Feed().
I know it's possibly to upload an image using FB.API() but this requires us building a custom popup to allow the users to type what they want to say for the message of the image rather than using the built-in popup from FB.Feed() and it doesn't give the options of who sees the post and as far as I can tell, it doesn't let us add a link, description and caption.
TLDR: Is FB.API() the only way to UPLOAD an image to a user's wall? If so, this requires building a custom interface for it instead of using the built-in FB.Post() interface, right?
Thanks,
Colter
Edit: I didn't see this post until now, but it's a similar question but I want to know if there is the ability to add a description, link and caption to the image AND use the built-in FB interface.
Copy/paste from Brian Jew's comment above:
"There currently isn't a way to upload screenshots without FB.API(). It does sound like an interesting idea to have something like that for FB.Feed() though."

Number in front of Facebook share button

I have a blog at http://pawan269.wordpress.com where I post my photos.
It has a share utility which I have enable from administrative interface. In this sharing utility there is an option to share using Facebook.
Not sure why it shows a number in front of "Facebook" text inside button, attached is a screen grab of a post Facebook share button.
Please let me know if anyone knows the right answer.
Thanks :)

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??