RE: [Flashcoders] Facebook API GetPhotos not working

2010-08-16 Thread David Hunter

Thanks for the suggestion Steven. I've spent a week trying to work with 
Facebook and the best I have managed is an AIR app using the 
actionscript-facebook api with AIR CONNECT. I can successfully log in and allow 
extended permissions and upload a picture from a webcam. I'm reasonably happy 
with that. Although I can't seem to grant regular permissions to access a 
user's photos. Do you know how this is done? I have had a quick go with Graph 
API (just making URLLoader calls and ignoring the actionscript api) and I can 
get an access token but I'm getting errors trying to grant access to 
user_photos as I'm not passing a redirect_uri as a parameter. But as its an AIR 
app I don't want/need a redirect so what should I be doing? Do I need to switch 
this back to a web based app rather than desktop app to use this method? In 
which case logging in might become an issue again! Thanks for your help,  David
> Date: Sat, 14 Aug 2010 23:36:34 -0700
> From: flash...@stevensacks.net
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Facebook API GetPhotos not working
> 
> I _highly_ recommend using the Graph API instead of the RESTful API.
> 
> It's S much simpler and easier.
> 
> http://developers.facebook.com/docs/api
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Facebook API GetPhotos not working

2010-08-14 Thread Steven Sacks

I _highly_ recommend using the Graph API instead of the RESTful API.

It's S much simpler and easier.

http://developers.facebook.com/docs/api
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Facebook API GetPhotos not working

2010-08-11 Thread David Hunter

Juan, thanks for the thorough response, and I fully agree that they seem to 
have changed things a lot and this has really annoyed developers. I'm pretty 
fed up already after 1 day of going in circles. I looked through bug 146 before 
but i am going back over it again. It seems I need to extend my permissions and 
add < user_photos > but after reading through 6 pages of docs on this I'm still 
pretty confused! Even in the docs they are mentioning the "migrations" tab and 
enabling "New Data Permissions" but this option does not exist! I'll re-post if 
I get anywhere or run into new difficulties, or just give up! Thanks

> Date: Tue, 10 Aug 2010 23:05:25 -0300
> Subject: Re: [Flashcoders] Facebook API GetPhotos not working
> From: califa010.flashcod...@gmail.com
> To: flashcoders@chattyfig.figleaf.com
> 
> It's most likely a permissions problem. Even if your pics are public, you
> (as a user) have to grant the app access to your data (except for the most
> basic stuff such as name, etc). This wasn't necessary before, if I recall
> correctly, but alas, FB API is rather unstable. They seem to change their
> minds about how things work all the time (and are not afraid of breaking the
> code of the suckers that use their services; you can get away with it if
> you're facebook, I guess).
> 
> Check this out:
> 
> http://code.google.com/p/facebook-actionscript-api/issues/detail?id=146
> 
> How do you ask the user for permssions? This doesn't have an easy answer,
> I'm afraid. It depends on how your app connects to FB. I've used the
> "official" AS library above in one project and I know it's actually a
> wrapper around a JS library. Don't remember the specifics, but I do remember
> that in all of the client libraries I used (the old JS client, the new JS
> client that uses the new Graph API and the PHP client), you can request a
> check for permissions when you call the login function; and if said
> permissions were not granted, the user will be presented a popup to accept
> or deny your app these permissions.
> 
> So you have to look up what's the name of the permission (whatever they
> decided it to call it this week) and how you can pass that to the JS code
> that actually connects to FB (I think there was something for that already
> in the AS library, but I'm not positive).
> 
> This should solve the problem in most scenarios, I think there are some
> cases not covered here, such as if the user is already logged in when they
> get to your app; the login method won't be called, so the user won't be
> asker for the necessary extended permissions; if they already grant your app
> these, no problem; if they don't or they revoked them, you'll have to work
> around this somehow. I remember I had to do this a while time ago (using the
> new JS client for the Graph API), but it was a mess, and involved using FQL
> from JS and whatnot... (all this because there's a very useful method in the
> FB API that returns the user status, but they forgot to include the current
> permissions granted by the user in the response; so you have to find other
> way to get that data, which in my case was using an ad hoc SQLish language
> called FQL. -- Sorry, this last paragraph was mostly a rant; developing
> against the FB API is a bit frustrating at times...)
> 
> An alternative approach I used (but only because I had to use the new Graph
> API) was doing something similar to what this guy did:
> 
> http://wellconsidered.posterous.com/fbflashbridge-v01
> 
> It's not as nice as the "official" library. It's kind of bare bones: some JS
> glue code around FB's JS client and a bit of Actionscript to  communicates
> with it. You don't have all the typed objects and stuff. I must say,
> compared to adobe's lib, it was way easier to debug / troubleshoot, though
> (since there's way less code and it's kind of easy to follow it; anyway, I
> used this approach because I had to use the graph API, but if I had to do
> any other FB app, I think I'd go this way, but that's just me, I guess).
> 
> Hope this helps somehow or at least gives you some pointers.
> 
> Cheers
> Juan Pablo Califano
> 
> 
> 
> 2010/8/10 David Hunter 
> 
> >
> > Hi List, . Anyone have any experience with the Facebook API? I have been on
> > it all day and got a simple application (based on the tutorial on adobe's
> > site) to work which fetches the users information such as name and
> > mini-photo, and other calls like listing their friends. But when it comes to
> > getting their photos, GetPhotos() it always returns an array of zero length.
> >

Re: [Flashcoders] Facebook API GetPhotos not working

2010-08-10 Thread Juan Pablo Califano
It's most likely a permissions problem. Even if your pics are public, you
(as a user) have to grant the app access to your data (except for the most
basic stuff such as name, etc). This wasn't necessary before, if I recall
correctly, but alas, FB API is rather unstable. They seem to change their
minds about how things work all the time (and are not afraid of breaking the
code of the suckers that use their services; you can get away with it if
you're facebook, I guess).

Check this out:

http://code.google.com/p/facebook-actionscript-api/issues/detail?id=146

How do you ask the user for permssions? This doesn't have an easy answer,
I'm afraid. It depends on how your app connects to FB. I've used the
"official" AS library above in one project and I know it's actually a
wrapper around a JS library. Don't remember the specifics, but I do remember
that in all of the client libraries I used (the old JS client, the new JS
client that uses the new Graph API and the PHP client), you can request a
check for permissions when you call the login function; and if said
permissions were not granted, the user will be presented a popup to accept
or deny your app these permissions.

So you have to look up what's the name of the permission (whatever they
decided it to call it this week) and how you can pass that to the JS code
that actually connects to FB (I think there was something for that already
in the AS library, but I'm not positive).

This should solve the problem in most scenarios, I think there are some
cases not covered here, such as if the user is already logged in when they
get to your app; the login method won't be called, so the user won't be
asker for the necessary extended permissions; if they already grant your app
these, no problem; if they don't or they revoked them, you'll have to work
around this somehow. I remember I had to do this a while time ago (using the
new JS client for the Graph API), but it was a mess, and involved using FQL
from JS and whatnot... (all this because there's a very useful method in the
FB API that returns the user status, but they forgot to include the current
permissions granted by the user in the response; so you have to find other
way to get that data, which in my case was using an ad hoc SQLish language
called FQL. -- Sorry, this last paragraph was mostly a rant; developing
against the FB API is a bit frustrating at times...)

An alternative approach I used (but only because I had to use the new Graph
API) was doing something similar to what this guy did:

http://wellconsidered.posterous.com/fbflashbridge-v01

It's not as nice as the "official" library. It's kind of bare bones: some JS
glue code around FB's JS client and a bit of Actionscript to  communicates
with it. You don't have all the typed objects and stuff. I must say,
compared to adobe's lib, it was way easier to debug / troubleshoot, though
(since there's way less code and it's kind of easy to follow it; anyway, I
used this approach because I had to use the graph API, but if I had to do
any other FB app, I think I'd go this way, but that's just me, I guess).

Hope this helps somehow or at least gives you some pointers.

Cheers
Juan Pablo Califano



2010/8/10 David Hunter 

>
> Hi List, . Anyone have any experience with the Facebook API? I have been on
> it all day and got a simple application (based on the tutorial on adobe's
> site) to work which fetches the users information such as name and
> mini-photo, and other calls like listing their friends. But when it comes to
> getting their photos, GetPhotos() it always returns an array of zero length.
> Does anyone have any knowledge on this? . I have seen lots of complaints
> about this issue on the forums, but much of the advice suggests changing
> parameters that don't exist in the application settings anymore. I'm not
> sure if the problem is a permissions thing set in the app, a permissions
> thing set by the user (i have made my photos completely public and still no
> change), if i am lacking a session key, or something else. I imagine/hope
> its something simple. I've tried running as a desktop app and on an external
> webpage but it still won't return any photos. I'm using Flash CS5 and the
> latest version of the Facebook library (v3.4). Unfortunately most of the
> examples are in Flex, which I don't have, and I haven't found a tutorial or
> snippet for straight Actionscript that uses GetPhotos() .. I've been tearing
> my hair out all evening and not got very far. Any help is greatly
> appreciated. . Thanks,David
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Facebook API GetPhotos not working

2010-08-10 Thread David Hunter

Hi List, . Anyone have any experience with the Facebook API? I have been on it 
all day and got a simple application (based on the tutorial on adobe's site) to 
work which fetches the users information such as name and mini-photo, and other 
calls like listing their friends. But when it comes to getting their photos, 
GetPhotos() it always returns an array of zero length. Does anyone have any 
knowledge on this? . I have seen lots of complaints about this issue on the 
forums, but much of the advice suggests changing parameters that don't exist in 
the application settings anymore. I'm not sure if the problem is a permissions 
thing set in the app, a permissions thing set by the user (i have made my 
photos completely public and still no change), if i am lacking a session key, 
or something else. I imagine/hope its something simple. I've tried running as a 
desktop app and on an external webpage but it still won't return any photos. 
I'm using Flash CS5 and the latest version of the Facebook library (v3.4). 
Unfortunately most of the examples are in Flex, which I don't have, and I 
haven't found a tutorial or snippet for straight Actionscript that uses 
GetPhotos() .. I've been tearing my hair out all evening and not got very far. 
Any help is greatly appreciated. . Thanks,David 
  ___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders