0

i want to get album of any page and then want to get photos and then its photos link of every album I using below api path not getting image url ..

for this i used :

https://graph.facebook.com/nike/albums?access_token=my_access_token

and this giving me

    {
   "data": [
      {
         "created_time": "2010-10-21T22:59:07+0000",
         "name": "Timeline Photos",
         "id": "440612488444"
      },
      {
         "created_time": "2014-11-23T01:10:20+0000",
         "name": "Nike Doernbecher Freestyle 2014 Collection",
         "id": "10152636589593445"
      },
      {
         "created_time": "2014-11-23T01:08:12+0000",
         "name": "Nike Doernbecher Freestyle 2014 Collection",
         "id": "10152636587168445"
      },
      more json....

and then from this json i get album id like 10152636589593445 then used this url

https://graph.facebook.com/10152636589593445/photos?access_token=my_access_token

ans result is :

{
   "data": [
      {
         "created_time": "2014-11-23T01:10:27+0000",
         "name": "Chase Crouch's canvas is the Stefan Janoski Max, with the color scheme and texture inspired by Dino \u2013 Chase\u2019s constant companion during treatment. The choice of fabric was inspired by Dino\u2019s fuzzy fur, and \u201cC7\u201d stands for Chase at 7, his age when he designed this collection. The hood lining the AW77 is a rendering of Chase\u2019s last brain scan showing that his tumor is clear.\n\ngonike.me/doernbecher",
         "id": "10152636589758445"
      },
      {
         "created_time": "2014-11-23T01:11:13+0000",
         "name": "Missy Miller's canvas is the Women\u2019s Nike Free 5.0 in her favorite colors, paired with a Swoosh as bright as her personality. On each tongue are two logos: A hand icon represents the finger pricks that help Missy keep her diabetes under control, and initials to honor her sister\u2019s memory. The NYC skyline is a huge inspiration, printed on the sockliner to remind Missy that the Big Apple is at her feet, and is also on the back of the Nike Free 5.0, where Missy dreams of seeing her name in lights one day.\n\ngonike.me/doernbecher",
         "id": "10152636590298445"
      },

To generate access token i did this Graph API Explorer

1 Select App from applications

  1. Get Page Access token from Get Token

  2. then clicked on Extend Access Token

Updated:

If i am using another token with this flow:

  1. from Application, select Graph API Explorer

  2. Select Get User Access Token from Get Token and select manage_pages

With this access_token i can get images link with above url but it is valid for only 1 hour.. wht to do to make it life time or long time like 1 year.?

Naresh
  • 2,761
  • 10
  • 45
  • 78
  • If you want extra fields, you have to specifically ask for them. (The duplicate is about additional fields when requesting user details, but the principle is exactly the same.) – CBroe Apr 28 '16 at 09:37
  • @CBroe ok thankyou got it. i have a question here. can i use http method to get data from fb graph api like this "https://graph.facebook.com/nike/albums?access_token=CAAI2k..." hope it will not create any issue in future. – Naresh Apr 28 '16 at 09:41

0 Answers0