Uploading image to Facebook and including it in feed post from iPhone App - iphone

I was working on an iphone app where users create images (think like a paint program); then they have an option to post it to Facebook: the image would be uploaded to the users albums and simultaneously a post would appear on their stream ("Hey, look what I just made with app X, get it here; etc).
This used to work just dandy, but it seems that Facebook no longer allows images hosted on their domain to be used in stream posts: FBCDN image is not allowed in stream is the error message.
Anyone have a workaround method for doing this kind of "upload and stream post in one shot" kind of thing? I know I could have the users upload all their created images to my own server and use that in the feed post...but that should be totally unnecessary. It shouldn't require an extra server for a user to draw a picture in a paint app and then upload to FB with a corresponding feed post about it.
Thanks!

I posted a similar question and learned that it's now a 2-step process where you upload the image to an album, then include a link to that in the feed. The answer is complicated, so please check over at that link. If you find it helpful, please up-vote that answer. (Feel free to up-vote/accept this one, too, but I understand that's sort of cheating ;)

Related

Facebook share only image

I am developing a website where users have the possibility to generate image. I want them to be able to share this image to facebook directly on my page using share button. Not as an article, but as an actual image. Is this possible?
Additionally, as a bonus, is it possible to prompt them option to create a seperate album for it? Since they may share tens and more of these images, it would be good if they wouldb be located on a seperate album or something, so they wont bury other images.
If it is a website, generally you share the webpage/article. There are many types in the opengraph format including ones for video and music. You should read the documentation. If you want the image to uploaded to a user's picture section, I'm not sure that is possible, I think you can only put stuff on a user's timeline. You should have also searched first as there is a stackoverflow question about this already.

Large links preview in facebook walls

Please have a look at the following images:
As you can see these two links both send to an external website but, the big link misleads the user into thinking that it is a picture, therefore boosting clicks, likens and shares on the item.
On the other hand the second picture is generated using the traditional sharer.php feature. Does anyone know how to get a large image for link previews? Or is it something achievable only via paid advertising? (I am not sure about this one, that big link is just a blog post, no reason for paid ads)

How to setup Facebook Timeline Cover Photo auto upload in website?

I am new to Facebook API and app development. I am trying to build a facebook timeline cover website where users can auto upload and publish the cover to a new album created in the website/app name. Then they would be redirected to another page on my website with instructions on how to setup the cover on their profile timeline. Most profile cover websites are using the same method such as myfbcovers.com, facebookprofilecovers.com, profilephotocovers.com, facebook.coversdaddy.com, fbcoverlover.com and newfbcovers.com to name a few. I have been searching the facebook developer pages and several tutorials over the net. Some tutorials I checked are:
http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/
http://daipratt.co.uk/facebook-api-upload-photo/
http://developers.facebook.com/blog/post/498/
And also several youtube videos.
But there are several confusions I have about the app. Sorry for the questions if they are too basic as I am a complete newbie who is willing to learn. One of the main problems is that most of the tutorials are outdated as the facebook app creation page etc. Now is different and there is no callback url etc. or canvas etc. in options now which are used in the tutorials. In the tutorials, it is mentioned that for creating a website app or facebook app for page, I need a callback URL which I cannot see now. Secondly, if it is mentioned in those tutorials that I need SSL in my website for an app but none of the facebook cover websites listed above have SSL it seems. I also do not have SSL on my server. So, not sure if that is needed and if an app is needed at all on my local server. And all the apps are doing things different such as I can see these URLs on clicking on some of the clickable links for uploading the cover button. Here are a few examples:
http://facebookprofilecovers.com/wp-content/themes/fbcovers/fb/?i=http%3A%2F%2Ffacebookprofilecovers.com%2Fwp-content%2Fuploads%2FHappily-Married-Facebook-Timeline-Cover.png
http://freetimelinecovers.net/facebook/?cov_img=/images/sports-covers/manchester-united.jpg
Some have direct link to the facebook app page such as:
http://apps.facebook.com/profilephotocovers/index.php?id=35 broken link
And only one website seems to have the publish_stream etc. in the url itself
https://facebook.com/dialog/oauth?client_id=162046520556852&redirect_uri=http%3A%2F%2Ffacebook.coversdaddy.com%2Fi-m-not-a-monster-1242.html&state=e4abcdc1d9288be8233a7ac4aa243997&scope=user_photos%2Cpublish_stream
On checking through Live HTTP header, it seems all websites are following a similar pattern which is directly used in the URL in the last website. For example, here are a few steps of the other websites I saw while checking with Live HTTP header.
https://graph.facebook.com/oauth/authorize?client_id=112308188876405&redirect_uri=http://www.myfbcovers.com/oauth/callback&scope=publish_stream,user_photos,email
https://facebook.com/dialog/oauth?client_id=237897089598589&redirect_uri=http%3A%2F%2Ffacebookprofilecovers.com%2Fwp-content%2Fthemes%2Ffbcovers%2Ffb%2Findex.php&state=0ca1581f006bdd80bd5da78e95179f3a&scope=publish_stream
And so on.
I could also notice that almost all websites were taking auth for only publish_stream and nothing else. Only myfbcovers.com is an exception which also asks for user_photos and email. Rest are not asking for the same and so perhaps publish_stream is the only permission needed.
So, to create the app is there any tutorial. And do I need to host the app on my own server in a sub directory of the website or does it make direct call to facebook. The reason I am asking is because it seems Facebook apps if hosted on local server needs SSL mandatory whereas none of the above websites have SSL/https. And if I do not need to host the app on my own server then how can I make the photo upload link to facebook and then return back to the website for the rest of the instructions. I am using Wordpress on my website like most of the other sites are doing and so, that should not be a problem I suppose. Any help would be highly appreciated. I am willing to learn properly and some good tutorials for creating the photo album and then uploading the photo to the user's album etc. would be fine too if not with the full code. Any help would be highly appreciated.
NOTE: I have removed the HTTP and WWW part in many of the above URLs as I can only post a maximum of two links being a new user. Please add them if needed in those where they are not present.
Ok, I did not install all the applications above to see exactly what they did. I think your question is long... but pretty straight forward. This is what I understand your question to be :
You would like to create a cover photo generator that will allow users to customize their cover photo by uploading files, maybe doing some editing to them. Also maybe using templates of cool ideas and in the end being able to update their cool new cover photo directly into their profile.
This is not very complicated to do although to this date there is no real documentation (by facebook) about how to dynamically update the cover photo. However there are ways of creating photo albums and uploading photos to there.
If you are planning to make your application run with in facebook - that means use the apps.facebook.com/your_app_name, and have canvas or tab URLS, then you will have to purchase an SSL certificate.
Finnaly, in order to get as close to the functionality your want, you might have to make some sacrifices (becuase changing the cover photo is not possible yet with the Graph API).
To locate the cover photo album you'll have to manually scan through all the users albums names - and for that you'll need the user_photos permission.
Once you have created the photo you want, you could possibly let the user upload it (publish_stream permission needed for this) to a different album, and then give the user some detailed instructions using screen shots and direct them exactly how to change their cover photo.
I recommend you read through the Authentication documentation decide what permissions you need (such as user_photos for the users photos and publish_stream for uploading a new picture or creating an album.)
In addition, there are many many tutorials on the Official Facebook Documentation Pages and their Developers Blog- check them out before going onto other sites that have written their own tutorials. Facebook does update their API quite a bit - but they also (recently) have been pretty good on updating their documentation to mirror the changes to the API...
As serious developers using a 3rd party API (
Graph API ), it is solely our responsibility to keep up to date with changes and to write code and applications that comply with their platform policies.

Profile Cover Editing via Facebook's Api

I know that this question was raised out several times,
and I even read most of the questions regarding the topic.
But there was a gap of about a month till now, and I'd like to know if there is any process in changing the Timeline Cover picture from the api(via an app).
Do you know any new information about this?
Or is there a solution out there? (except for uploading to cover folder)
Thanks in advance.
In fact, thereĀ“s no API support for it, but you can upload a photo and then redirect user to:
http://www.facebook.com/profile.php?preview_cover=PHOTO_ID
There is currently no API to change the cover photo; i'm not aware of plans to change this
facebook does not allow an app to upload a picture to the profile album. that is sort of a security restriction and will apply to cover images too, i guess. so you can upload a picture to a new album or any other album, but NOT the profile or timeline cover album.
i doubt that facebook will ever change this, unfortunately.
Profile Timeline is not yet released for all, so maybe we won't be getting any access via graph api until facebook releases timeline for all.

Is it possible to share and see a link using ShareKit in iOS(need the exact way as Web)

I have an app and I am using ShareKit for sharing in Facebook. I am able to share URLs, images and texts to FB using that. But why did the link/url share do not work the same way as when I share a url from Web Facebook. I have got many contents like image in my url and while doing the Share through web I am able to see the image and a small portion of content, but while I am doing it from iPhone using ShareKit, it just gives the heading/title and we need to click on that link(no images or contents).
If anyone know the solution, please help.
When you share a link on the Facebook site it will automatically fetch the URL and display some appropriate images that you can choose from. However, when directly interacting with the API this won't happen. You must provide the image yourself (or Facebook may use the image associated with your application). ShareKit may abstract this away from you, so you might want to look into using the Facebook SDK and Graph APIs directly.
I fixed the issue. Instead of posting(POST) the attachment dialog, just use GET method in the load function and pass the link you want to share. :)