, and then I worked on the ASPSnippets FaceBook API to add functionality to upload photos, pictures or images to FaceBook wall Show Note: You can download the latest ASPSnippets.FaceBookAPI.dll clicking the download link below. Download DLL file
More FaceBook Articles ASP.Net Get FaceBook User details like Gender, Email, Address Location and Birth Date Import FaceBook Album Photos and display as Image Gallery in ASP.Net Login with FaceBook account in ASP.Net Website Post Publish and Share content on user’s FaceBook Wall using Graph API in ASP.Net FaceBook - Get Full size Profile Picture of user in ASP.Net using C# and VB.Net
Create FaceBook Application and get App Id You will need to create an application and get an API Key and API Secret. You can refer my article Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
HTML Markup The HTML Markup is simple it consist of an ASP.Net FileUpload control, a Multiline TextBox and a Button. <asp:FileUpload ID="FileUpload1" runat="server" /> <br /> <br /> <asp:TextBox ID="txtMessage" runat="server" TextMode = "MultiLine"></asp:TextBox> <hr /> <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick = "UploadPhoto" />
Namespaces You will need to import the following namespaces C# using ASPSnippets.FaceBookAPI;
VB.Net Imports ASPSnippets.FaceBookAPI
Upload Photo (Image) to FaceBook Wall On the click of the button the UploadPhoto event handler is raised which sets the uploaded file and the message in the Session variable and then redirects user to FaceBook site to fetch the Access Code. The FaceBook site redirects back to the page with the access code and then the File and the Message are posted on to the FaceBook wall using the FaceBookConnect PostFile method. I want to upload a series of images to Facebook and group them together in a single post. Right now I’m able to upload the pictures without any problems, but the pictures are publish in single posts each one of them. I followed this guide from the developers documentation, but still no success on grouping all the images in a single posts. I’m first uploading the pictures with “published → false” on the “/photos” endpoint and after that I get the ID’s and send each one to the endpoint “/feed”. Facebook's application programming interface lets you create apps to maintain your business' group page without sitting down at a computer and logging into the social networking site. Using this API you can customize applications to desktop or mobile platforms for publishing pictures to your group page at any pace your company needs. The process involves authenticating the program with the Facebook API, authenticating picture publishing permissions with your business's account, then sending post requests via HTTP to Facebook's servers. The Graph
Authentication
App Authentication
Posting Picture
|