Indecible / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

GetAlbums always returns empty #158

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
First off, thanks for taking the time to read this - I'm sure you're very busy. 
 I am writing because I am unable to get Album information from Facebook users 
using the AS3 API.  In fact, the Sample apps at 
http://www.adobe.com/devnet/facebook/samples/index.html do not function either. 
 They compile and run, but the album lists are always empty.

For example, running the following code (assuming the session has been 
successfully initialized, logged in, etc) always returns 0:

   var call:FacebookCall = fbook.post(new GetAlbums(fbook.uid));
   call.addEventListener(FacebookEvent.COMPLETE, handleGetAlbumsResponse);
   private function handleGetAlbumsResponse(event:FacebookEvent):void {
      var albumsResponseData:GetAlbumsData = event.data as GetAlbumsData;
      trace("---Album length: "+albumsResponseData.albumCollection.length);
   }

Do you have any thoughts as to why this is happening, even with the Sample 
code?  Thanks in advance!

- John Currie

Original issue reported on code.google.com by jcurrie33@gmail.com on 21 Jul 2010 at 6:49

GoogleCodeExporter commented 8 years ago
I guess it happens because Facebook dropped support for this function call and 
the AS3 API isn't upgraded to OpenGraph API yet!

Original comment by skoles...@gmail.com on 4 Aug 2010 at 1:45

GoogleCodeExporter commented 8 years ago
Hi, the problem it's in the permission, For what the albums become not empty, 
the application must get permissions from user, in this case "user_photos". To 
do this, we have to modify the function "grantExtendedPermission" in the class 
Facebook.as, so that:

public function grantExtendedPermission(servidor:String, idKey:String, 
api_key:String, perm:String):void {         
navigateToURL(new 
URLRequest('http://www.facebook.com/connect/uiserver.php?app_id=' + idKey + 
'&next=' + servidor + '&cancel=http://www.facebook.com'+'&api_key='+ api_key 
+'&method=permissions.request&return_session=1&session_version=3&fbconnect=1&can
vas=1&legacy_return=1&perms=' + perm), '_top'), '_blank');
        }

Any Question please post here, thanks (Excuse my english)   :)

Original comment by cesarazu...@gmail.com on 15 Sep 2010 at 10:05

GoogleCodeExporter commented 8 years ago
if you created a standalone flash app. Why not redirect the user to a Site URL 
to grant the permission under the same facebook application account using the 
graph api facebook. Only do this if your app detect 0 albums from the user. 
Means he/she have not grant the permission.  and will grant the permission from 
a URL Site with the same application account.

for the website - just follow this tutorial using the graph api. and upload.
http://www.bigspaceship.com/blog/labs/bss-classes-flash-and-the-fb-graph/

for the standalone app - just use this fb-as3 api.

Original comment by mat.cata...@gmail.com on 22 Sep 2010 at 6:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
New release based of Facebook's Graph API is coming soon.  SDK which this issue 
depends on is no longer supported by Facebook.

Original comment by alan...@gmail.com on 29 Sep 2010 at 7:50

GoogleCodeExporter commented 8 years ago
New release based of Facebook's Graph API is coming soon.  SDK which this issue 
depends on is no longer supported by Facebook.

Original comment by alan...@gmail.com on 29 Sep 2010 at 7:50