Code Monkey home page Code Monkey logo

Comments (3)

Harvey-Mushman avatar Harvey-Mushman commented on August 18, 2024

Found a solution... would be nice if this functionally was included in your library. Here is a link:
http://stackoverflow.com/questions/35845623/uploading-a-canvas-image-to-facebook-as-blob-of-multipart-form-data-type and it includes a working jsFiddle!

from angular-easyfb.

pc035860 avatar pc035860 commented on August 18, 2024

Hi @Harvey-Mushman ,

Glad that you finally get the answer, it seems that Facebook sincerely don't want JS developers upload images directly to their APIs.

angular-easyfb tries to be only a wrapper around Facebook's JavaScript SDK, hence there's no plan on adding any additional functionality beyond the JS SDK. Appreciated for the advice!

from angular-easyfb.

Harvey-Mushman avatar Harvey-Mushman commented on August 18, 2024

Thanks for responding. And yes, the post on Fiddler works in combination with your ezFB.

I just wonder if I’m are missing something in your reply… it is not the FB SDK that is functionality incomplete but the EZFB library that seems to be lacking a richer interface to communicate with Facebook.

If you consider the iOS or Android SDK’s they both accept bit streams directly from the smartphone that is posting to Facebook – right? Thinking about it differently, when was the last time you used your smartphone as a camera, stored the picture on a public domain and then back into your FB app on the phone and uploaded a photo. This is a lot of extra steps for the end user who may or may not have a public domain in the first place.

If you further inspect the Fiddler code (https://jsfiddle.net/ilyador/vyne7oh2/8/), you will notice the Facebook post is still using the FB SDK without any special tricks of gimmicks. The only difference is the way the data is packaged on the client side when the photo data comes from memory (HTML5 Canvas). The trick is to use the JavaScript new XMLHttpRequest() object on which you build the request that ultimately gets posted back. XMLHttpRequest allows Multipart posts which is the specification Facebook calls out in their documentation for posting “source” data.

In my opinion this should be a basic feature of any AngularJS library since it is supported by Facebook.

All the best, Harvey

From: Chih-Hsuan Fan [mailto:[email protected]]
Sent: Wednesday, March 30, 2016 2:10 AM
To: pc035860/angular-easyfb
Cc: Harvey-Mushman
Subject: Re: [pc035860/angular-easyfb] Upload photos from camera source (#64)

Hi @Harvey-Mushman https://github.com/Harvey-Mushman ,

Glad that you finally get the answer, it seems that Facebook sincerely don't want JS developers upload images directly to their APIs.

angular-easyfb tries to be only a wrapper around Facebook's JavaScript SDK, hence there's no plan on adding any additional functionality beyond the JS SDK. Appreciated for the advice!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #64 (comment) Image removed by sender.

from angular-easyfb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.