about 1 month ago


Facebook Api Make Post

Download

Facebook Api Make Post

–Sterpu Mihai Dec 18 '12 at 23:44 show 2 more comments 4 Answers 4 active oldest votes up vote 2 down vote It should be objectattachment instead of objectid. -Simone siscia Posted Dec 26 2013 7:02 PST Edit Report Hi Simone, This should work for you: function publishFacebook(){ console.log('dentro publish'); var dataURL = canvas.toDataURL('image/png'); var onlyData = dataURL.substring(dataURL.indexOf(',')+1); var decoded = atob(onlyData); var dl = decoded.length; var buffer = new Uint8Array(dl); for (var i = 0; i < dl; i++) { buffer[i] = decoded.charCodeAt(i); }; var blob = new Blob([buffer], {type: 'image/png'}); var formData = new FormData(); formData.append('source', blob); formData.append('message', 'Whatever message we decide'); FB.api('/me/photos', 'POST', formData, function(resp) { console.log('into function'); if (resp && !resp.error) { console.log('uploaded'); console.log(resp); } else { console.log('some error'); console.log(resp.error); }; }); }; Merry Christmas :) Regards, Nikola Boychev NBoychev Posted Dec 26 2013 9:51 PST Edit Report Hi Nikola, does that works in your environment ? I tried and I get back the error 324 Object {message: "(#324) Requires upload file", type: "OAuthException", code: 324} Also I see the use of atob, that is not completely supported by mobile phone's javascript. You can add your message to message parameter and it will appear on the user's story board. I guess that the problem is the encoding, but I just followed the specification. Email or username already exists or bad captha. Email Sign Up or sign in with Google Facebook facebook graph api create wall post with uploaded picture Ask Question up vote 2 down vote favorite 1 I'm following these steps to create a wall post with a picture using the FB Graph API: Upload the picture into a specified folder (working OK) -> this returns an id and a postid Send a POST to with the following parameters: accesstoken - my current accesstoken message - a simple message like "hello" objectid -the postid obtained in step 1, after photo upload The post message appears on the wall, but there is no photo: What am I doing wrong? I mention that i don't want to attach a link to the photo. If you want to post a photo directly, see developers.facebook.com/docs/reference/api/user/#photos and developers.facebook.com/docs/reference/api/photo –CBroe Dec 18 '12 at 15:25 Ok, but how can I mimic the same behaviour as when I click the "What's on your mind?" box, type something, then click Photo -> Upload, etc.? This is what I want to do. Please try again. rev2018.1.9.28317 . For example, native Facebook for Android todo: create album with name "MobileUploads", upload photo to this album and create post at feed with this photo. Maybe it's a bug. with just the URL it works perfectly. SupportPlatform StatusDevelopers GroupMarketing PartnersBugs.. }); Where params contains the post message and the url of the photo/picture. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . For now I fixed the issue hosting the image in imgur, it works but it is not what I want. which I already tried but doesn't quite work. Stack Overflow Questions Developer Jobs Tags Users current community help chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. shareimprove this answer answered May 5 '14 at 11:12 user2783280 31 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. shareimprove this answer edited May 23 '17 at 12:17 Communityf 11 answered Oct 10 '13 at 5:37 Steve Teale 7917 Create album - is right logic. siscia Posted Dec 24 2013 13:38 PST Edit Report Hi siscia, To isolate the issue, you can try uploading external image: "url": "{image-url}" Just add an image as the url parameter (without the brackets). Not the answer you're looking for? Browse other questions tagged facebook facebook-graph-api or ask your own question. When I click on my submit to FB link, the Facebook popup just says "An Error Occurred. Cheers Simone siscia Posted Dec 27 2013 1:15 PST Edit Report Hi siscia, Sorry for the late response. –mill Jul 20 '11 at 18:01 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . I tried with function publishFacebook(){ console.log('dentro publish'); var dataURL = canvas.toDataURL() var onlyData = dataURL.substring(dataURL.indexOf(',')+1, dataURL.length); var decoded = Base64Binary.decode(onlyData); var imageIwillPost = getFormData2(decoded, "aaa", "bbb.png"); console.log(imageIwillPost); FB.api('/me/photos', 'POST', {'source': '{' + imageIwillPost + '}' , 'message': 'Whatever message we decide'}, function(resp) { console.log('into function'); if (resp && !resp.error) { console.log('uploaded'); console.log(resp); } else { console.log('some error'); console.log(resp.error);}});} Well the code is pretty much here: Anyway, I got back this from facebook, from the javascript console in chrome: POST 500 (OK) all.js:85 into function main.js:77 uploaded main.js:79 Object {errorcode: 1, errormsg: "An unknown error occurred"} And I really don't know what to do. .. Stack Overflow Questions Developer Jobs Tags Users current community help chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Join Stack Overflow to learn, share knowledge, and build your career. By signing in to CodersClan you agree to our Terms & Conditions Sign in Close Welcome to the Clan! The world will remember this glorius day! Tweet Share Share Tell your friends and invite them over No thanks . I need to create a POST on the wall containing a picture. If this is not the case, please leave it to other coders as failure may harm your reputation 5a02188284
como hackear um facebook 2013 passo a passo
feed url for facebook
how to hack a facebook id in bangla
facebook account temporarily locked
how to customize facebook login button
facebook chat instant messenger for mobile
password dungeon blitz facebook hack cheat tool
facebook weather channel app
how to make facebook photos private to public
facebook 10000 likes hack

← Adobe Premiere Elements 9 Keygen Rapidshare suchmaschinen nasse Trik Update Status Facebook Dilike Ribuan Orang pagina compatible su →