lacostabr / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

How to publish a photo to facebook using Socialauth-net #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Can this be done?

The facebook Status update example does a great job publishing simple text 
based status updates to ones facebook profile.

How must we change the code within executeFeed() method to publish a photo to a 
users facebook wall?

Original issue reported on code.google.com by gerald.l...@gmail.com on 6 Oct 2012 at 7:22

GoogleCodeExporter commented 9 years ago
I noticed that on the BrickRed facebook page there is an image posted by the 
BrickRed app with a description of "test".  How did your app achieve this.  Was 
it performed using SocialAuth-Net method ExecuteFeed or through some other 
method call.

I was able to post an image to facebook using a POST method to me/photos, but 
not through SocialAuth.  I did it with C# SDK for facebook.

Try this with nuget in Visual Studio:
PM > Install-Package Facebook.

-Gerald Thomas

Original comment by gerald.l...@gmail.com on 10 Oct 2012 at 7:39

GoogleCodeExporter commented 9 years ago
The demo you checked is of JAVA version which has recently upgraded to support 
photo posting. .NET version doesn't support an inbuilt functionality for the 
same but you can still post photos with SocialAuth.NET (without needing any 
external library support) through magical method ExecuteFeed. You would need to 
post binary data of image to https://graph.facebook.com/me/photos" to upload 
photos. You should get more details in graph API.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 11 Oct 2012 at 7:11

GoogleCodeExporter commented 9 years ago
Well if we can use ExecuteFeed() as a post method to post an image please 
provide when basic example.  I have already tried to post images by using the 
https://graph.facebook.com/me/photos but the problem is knowing how to properly 
format the headers.  I've exhaustively read through all of the Facebook graphi 
API documentation and there simply aren't any examples on how to POST to an 
album using the HTTP POST methods.  The ONLY example I was able to find that 
Facebook has documentation on is by using PHP.  Deepak, I beg you to provide 
one complete example in .NET.  Please show me what the actual completed line of 
code would look like using the execute feed method.  Thank you.  Furthermore if 
you are able to assemble such an example for my request please append this to 
SocialAuth documentation so that others may benefit too.  Thank you.

Original comment by gerald.l...@gmail.com on 11 Oct 2012 at 7:32

GoogleCodeExporter commented 9 years ago
Hi Gerald,

Here is what you wanted: 
http://code.google.com/p/socialauth-net/wiki/FAQs?ts=1350282395&updated=FAQs#How
_to_post_a_Photo_on_Facebook_Wall

Just create a web form and add a Submit button along with FileUpload control to 
try this code.

Enjoy!
Deepak

Original comment by deepak.a...@3pillarglobal.com on 15 Oct 2012 at 6:34