Facebook Post


#1

Is there a way to post to a Facebook wall from within a juce app?

 


#2

Have a look at this [ http://stackoverflow.com/questions/6156052/how-to-write-a-post-to-my-facebook-apps-wall-from-app-engine-using-python ] post (about python, but general principle will be the same).

 

Hope this helps


#3

 

not as standard.

However, it can be done. you have to do your own OAuth and allow the user to validate using the web browser component. I might be able to answer specific questions.

 

 


#4

While doing a demonstration of my product to a lot of the top musicians in Las Vegas, the question was asked, can my application post an image to a Facebook. I asked them if they thought this was needed, and the response was, as silly as it seems, maybe yes in today's social world. My application saves part of a score as an image, and they would like the image to be posted as well as being saved to disk.

Facebook is an area that I know very little about, so yes specific answers would be welcome. Just pointing me to php code or similiar doesn't really help. I am hopping someone knows how to implement this from a simple app like the Juce Demo. And it might be useful to others.

Thanks for any help.

 


#5

 

Unfortunately, it's not at all simple. There are numerous libraries out there to post to FB including ones officially released and supported by FB. However, none i could find did the job in C++, all required PHP or some kind of web scripting not compatible with Juce.

If anyone knows of a C++ library (that works), i'm most interested.

First off FB has two kinds of interface, IIRC there's the old REST interface and the new Open Graph API. The new interface allows you to do things like post an image properly, the old one allows you to have a tough time :-)

Now, as i understand it, to post with the graph API your application has to be APPROVED by FB. I didn't like this idea, sounds like you do a whole bag of work then they chuck you.

https://developers.facebook.com/docs/opengraph/overview/

" Review Process
It's very important that all stories told on Facebook are high quality and don't surprise the person using your app. This means that all apps that want to use Open Graph must go through a review process for the stories they create. You can learn more about this process in our submission process document. "

So instead i had a crack at the REST interface. In the end i used libcurl which can be linked with Juce without too much fight but you have to write the OAuth stuff yourself or use another library (which appear to be equally rare in C++).

Turns out i managed to post images, but FB likes to do "clever" things with them like resize them really small (unless you use the graph api). The other thing it likes to do, is merge all your picture posts into one, which means people dont see them.

I did get something to work in the end, but FB likes to expire you codes all the time, which means you have to constantly re-authenticate.