2012-12-14 42 views
-1

婁JSON包含我的JSON粉絲頁面信息format.I試圖在的getJSON jQuery的,但它並沒有爲我工作如何從JSON在Facebook的圖形API解析圖像

{ 
     "about": " One who does something \n\n", 
     "description": "Doers Web development\nDoers Software Development\nDoers Graphics design\nDoers Hardware & Networking\nDoers Mobile Application Development", 
     "is_published": true, 
     "location": { 
      "street": "", 
      "city": "Colombo", 
      "country": "Sri Lanka", 
      "zip": "" 
     }, 
     "phone": "+94773633412", 
     "talking_about_count": 686, 
     "username": "DoersIncorporation", 
     "website": "http://www.doers.lk", 
     "were_here_count": 0, 
     "category": "Computers/technology", 
     "id": "397319800348866", 
     "name": "Doers Inc", 
     "link": "https://www.facebook.com/DoersIncorporation", 
     "likes": 767, 
     "cover": { 
      "cover_id": 398352273578952, 
      "source": "http://sphotos-f.ak.fbcdn.net/hphotos-ak-snc7/s720x720/484190_398352273578952_36222530_n.png", 
      "offset_y": 0 
     } 
    } 

我想什麼知道是如何解析它使用PHP和jQuery的封面圖像?

回答

1

保存JSON給一個變量:

var x = theJSON 

x.cover.source 

將返回URL

Fiddle