Click here to Skip to main content
15,885,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am trying to get the user photos using facebook graph API.I am jetting JSON response when I send query along with my access token. So what should I do now to convert that response into pictures. Here is the part of response


HTML
"id": "758607677542584",
   "name": "Hari Nakshatrala",
   "albums": {
      "data": [
         {
            "id": "111111111111",
            "from": {
               "id": "7584",
               "name": "xyz"
            },
            "name": "Profile Pictures",
            "link": "https://www.facebook.com/album.php?fbid=1030&id=75862584&aid=",
            "cover_photo": "701441",
            "privacy": "everyone",
            "count": 83,
            "type": "profile",
            "created_time": "2010-10-27T10:07:09+0000",
            "updated_time": "2014-09-11T04:51:51+0000",
            "can_upload": false
         },
         {
            "id": "2696",
            "from": {
               "id": "754",
               "name": "abc"
            },
            "name": "Cover Photos",
            "link": "https://www.facebook.com/album.php?fbid=296&id=75\&aid=58382",
            "cover_photo": "5011",
            "privacy": "everyone",
            "count": 24,
            "type": "cover",
            "created_time": "2012-02-12T04:06:14+0000",
            "updated_time": "2014-08-13T17:40:41+0000",
            "can_upload": false
         }
Posted
Updated 27-Dec-14 19:30pm
v2
Comments
Member 11239022 28-Dec-14 10:33am    
The code is working fine with only my account but when I logged in with other account it is saying that " App Not Setup: The developers of this app have not set up this app properly for Facebook Login.".. What should I do? plz help me

1 solution

You can try using the Newtonsoft.JSON[^] API to deserialize this JSON syntax to an object. That would be converted into an anonymous object, to make sure you get an object that you know how to extract data from. Please create the classes created inside this website, http://www.aspsnippets.com/Articles/Import-Facebook-Album-Photos-and-display-as-Image-Gallery-in-ASPNet.aspx[^]. It contains the class used to generated an object for album and photos.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900