AnthonyLins / facebook-actionscript-api

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

Listing contents of an Album with >25 Photos does not return "paging" property to onComplete callback #440

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Request the contents of an Album with >25 Photos
2.
3.

What is the expected output? What do you see instead?
At minimum, the reponse shoudl include the "data" and "paging" properties 
returned from FB.

What version of the product are you using? On what operating system?
FB AS3 API 1.8.1

Please provide any additional information below.

There is an error in AbstractFacebook.as when returning the results of querying 
an Album

at com.facebook.graph.core::AbstractFacebook/handleRequestLoad  
( 
http://code.google.com/p/facebook-actionscript-api/source/browse/trunk/source/ap
i/com/facebook/graph/core/AbstractFacebook.as )

The result object contains two properties if there are >25 images in the album, 
"data" and "paging". 
At line 234
     var data:Object = ('data' in target.data) ? target.data.data : target.data;

The AbstractFacebook class decides that target.data.data is the "correct" item 
to return, however this is only because a data.data property exists.

Discarding the data.paging property is incorrect bahaviour.

target  com.facebook.graph.net.FacebookRequest (@207d3191)  
    [inherited] 
        _callback   Function (@20e3dfb1)    
        data    Object (@21839fb9)  
            data    [] (@244fc821)  
            paging  Object (@22b2a539)  
        _data   Object (@21839fb9)  
        rawResult   SOME_JSONDATA
        _requestMethod  "GET"   
        success true    
        _success    true    
        successCallback <setter>    
        _url    "https://graph.facebook.com/3540502795508/photos"   
        urlLoader   flash.net.URLLoader (@7e76941)  
        urlRequest  flash.net.URLRequest (@236ee071)    
    fileReference   null    

Original issue reported on code.google.com by torkrist...@gmail.com on 17 Sep 2012 at 2:40