Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Posting a photo to Facebook - doesn't support blobs?! iOS

$
0
0

Hi guys,

I'm trying to post a picture to facebook, it always used to work just fine but now I get an error saying TiBlob is not a supported format?!

You can see the console output here:

http://img.photobucket.com/albums/v260/evil_dr_fish/Appcelerator%20Screenshots/error%20msg_zpscnbgcajs.jpg

I'm using the 4.0 Beta (4.0.1.201505170721) on Mavericks running on an iPhone 4 running 7.1.2

Here's my code

data = {
        link: "http://www.facebook.com/Game",
        name: "Game",
        caption: "Game",
        picture: blobImage
    };
 
    if (fb.permissions.indexOf('publish_actions') < 0 ){
 
        fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_FRIENDS, function(p){
 
            if (p.success){
 
                fb.requestWithGraphPath('me/photos', data, 'POST', function(e){
 
                    if (e.success) {
                        addCoins.on(facebookCoins, facebookBonusPost, function(outcome){
                            myAlerts.on("Posted!", "Certificate Posted To Your Page");
                        });
                    } else {
                        myAlerts.stayOn("Oops!", "Something Went Wrong!\nTry Logging Out Of Facebook And Then Log Back In" + e.error);
                    };
                });
 
            } else if (p.cancelled){
                myAlerts.stayOn("Cancelled! :(","You Can't Post Pictures For Your Friends Without Giving Permission!");
            } else {  // Error or anything else
                myAlerts.stayOn("Error! :(", "There is a problem with Facebook!");
            };
        });
 
    } else {  //  Permission already granted
 
        fb.requestWithGraphPath('me/photos', data, 'POST', function(e){
 
            if (e.success) {
                addCoins.on(facebookCoins, facebookBonusPost, function(outcome){
                    myAlerts.on("Posted!", "Certificate Posted To Your Page");
                });
            } else {
                myAlerts.stayOn("Oops!", "Something Went Wrong!");
            };
        });
    };

FWIW This was working just fine on Android, although now I've replaced it with an intent chooser for greater sharing options and the 'blobImage' still works just fine with that.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>