dangtranduc / facebook-java-api

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

photos_getAlbums doesn't allow specificing a collectiion of String album IDs #271

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Try and retrieve photos for a user who has String (not Long) based photo
album IDs
2. Expect to be able to pass a Collection<String> but can not

What is the expected output? What do you see instead?
Expected behaviour is that you should be able to retrieve any FB users album.

What version of the product are you using? On what operating system?
3.0.1 (FacebookXMLRestClient)

Please provide any additional information below.

Some users still have String based photo album IDs.
Here is a test console grab showing a user who has string album IDs and a
valid response from FB. In this case the 2 album IDs are 100000000011201_-3
and 100000000011201_931. The assumption that all photo album IDs are Longs
is invalid.

---
$facebook->api_client->photos_getAlbums('','100000000011201_-3,
100000000011201_931');
<?xml version="1.0" encoding="UTF-8"?>
<photos_getAlbums_response xmlns="http://api.facebook.com/1.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://api.facebook.com/1.0/
http://api.facebook.com/1.0/facebook.xsd" list="true">
  <album>
    <aid>100000000011201_-3</aid>
    <cover_pid>100000000011201_8220</cover_pid>
    <owner>100000000011201</owner>
    <name>Profile Pictures</name>
    <created>1240342742</created>
    <modified>1240342742</modified>
    <description/>
    <location/>

<link>http://www.facebook.com/album.php?aid=-3&amp;id=100000000011201</link>
    <edit_link>http://www.facebook.com/editphoto.php?aid=-3</edit_link>
    <size>1</size>
    <visible xsi:nil="true"/>
    <type>profile</type>
    <object_id>0</object_id>
    <modified_major>1240342742</modified_major>
  </album>

  <album>
    <aid>100000000011201_931</aid>
    <cover_pid>100000000011201_8221</cover_pid>
    <owner>100000000011201</owner>
    <name>my friends</name>
    <created>1240342799</created>
    <modified>1240478107</modified>
    <description/>
    <location/>

<link>http://www.facebook.com/album.php?aid=931&amp;id=100000000011201</link>
    <edit_link>http://www.facebook.com/editphoto.php?aid=931</edit_link>
    <size>14</size>
    <visible xsi:nil="true"/>
    <type>normal</type>
    <object_id>100552613288072</object_id>
    <modified_major>1240478107</modified_major>
  </album>

</photos_getAlbums_response>

---

Original issue reported on code.google.com by yate...@gmail.com on 24 Nov 2009 at 12:20

GoogleCodeExporter commented 9 years ago
Note that the same problem also occurs with photo ids.

For this user querying one of their albums shows that their photo IDs (pid's) 
are
also Strings. N.B. pid 100000000011201_8221 and 100000000011201_8222

-----
<?xml version="1.0" encoding="UTF-8"?>

<photos_get_response xmlns="http://api.facebook.com/1.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://api.facebook.com/1.0/
http://api.facebook.com/1.0/facebook.xsd" list="true">

  <photo>
    <pid>100000000011201_8221</pid>
    <aid>100000000011201_931</aid>
    <owner>100000000011201</owner>

<src_small>http://photos-h.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_10055266
9954733_100000000011201_8221_5953968_t.jpg</src_small>
    <src_small_width>75</src_small_width>
    <src_small_height>89</src_small_height>

<src_big>http://photos-h.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_1005526699
54733_100000000011201_8221_5953968_n.jpg</src_big>
    <src_big_width>300</src_big_width>
    <src_big_height>358</src_big_height>

<src>http://photos-h.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_10055266995473
3_100000000011201_8221_5953968_s.jpg</src>
    <src_width>108</src_width>
    <src_height>130</src_height>
    <link>http://www.facebook.com/photo.php?pid=8221&id=100000000011201</link>
    <caption/>
    <created>1240342952</created>
    <modified>1240342952</modified>
    <object_id>100552669954733</object_id>
  </photo>

  <photo>
    <pid>100000000011201_8222</pid>
    <aid>100000000011201_931</aid>
    <owner>100000000011201</owner>

<src_small>http://photos-f.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_10055267
3288066_100000000011201_8222_1134644_t.jpg</src_small>
    <src_small_width>75</src_small_width>
    <src_small_height>62</src_small_height>

<src_big>http://photos-f.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_1005526732
88066_100000000011201_8222_1134644_n.jpg</src_big>
    <src_big_width>500</src_big_width>
    <src_big_height>417</src_big_height>

<src>http://photos-f.ak.fbcdn.net/hphotos-ak-snc1/hs019.snc1/3025_10055267328806
6_100000000011201_8222_1134644_s.jpg</src>
    <src_width>130</src_width>
    <src_height>108</src_height>
    <link>http://www.facebook.com/photo.php?pid=8222&id=100000000011201</link>
    <caption/>
    <created>1240342952</created>
    <modified>1240342952</modified>
    <object_id>100552673288066</object_id>
  </photo>

</photos_get_response>
-----

Original comment by yate...@gmail.com on 24 Nov 2009 at 12:56