有人可以告訴我「如何獲得」或「什麼是」在院子裏的文檔http://rubydoc.info/github/Instagram/instagram-ruby-gem給出的紅寶石instagram api方法location(id), location_recent_media(id,options{}), media_item(id), media_likes(id)
等使用的'id'參數?我正在使用rails,並且使用gem安裝api。如何從instagram api獲取'id'參數?
1
A
回答
1
你可以看到如何在這裏使用API https://github.com/Instagram/instagram-ruby-gem的例子,看看代碼我會說,ID是依賴於你正在查詢,如果你使用的位置(ID)它會是位置的ID。現在,要從「真實世界」位置獲取該ID,我相信您可以使用location_search(經度,緯度),這將爲您提供一個數組,其中包含所有與該座標接近的位置,例如(來自代碼文檔):
Instagram.location_search("37.7808851", "-122.3948632")
這會給你一個陣列周圍的位置37.7808851,-122.3948632(164 S公園,SF,CA美國)。
然後你可以使用IDS進行陣列與位置(ID),e.g:
mylocations = Instagram.location_search("37.7808851", "-122.3948632")
Instagram.location(mylocations.first)
希望它能幫助。
相關問題
- 1. Api Instagram,獲取任何媒體的新評論(自參數日期或ID)
- 2. Instagram API獲取max_tag_id
- 3. 如何從Instagram獲取視頻觀看次數API
- 4. 如何獲取Instagram API訪問令牌
- 5. 獲取媒體ID的Instagram
- 6. 從Facebook獲取Instagram帳戶頁面API
- 7. 從instagram api獲取位置媒體
- 8. 使用BitMaps從Instagram獲取圖像API
- 9. 如何從OpenTracing API獲取跟蹤ID?
- 10. instagram api評論獲取
- 11. Instagram API使用PHP獲取JSON數據
- 12. 如何從Instagram API獲取裁剪後的圖像?
- 13. 如何從Android上的Instagram API獲取圖片拍攝日期?
- 14. 我如何使用ruby從Instagram獲取JSON API
- 15. 如何通過API獲取Instagram照片上的股票數量?
- 16. 如何從Instagram用戶名中獲取Instagram電子郵件?
- 17. Rest api如何獲取參數?
- 18. 如何從字符串中獲取id參數?
- 19. 如何從URL中獲取ID作爲參數
- 20. Instagram的API不fufilling計數參數
- 21. 如何從Events API獲取email_ids(不是G + id)API
- 22. 如何從URL獲取ID?
- 23. 從instagram api獲得離線access_token獲取用戶圖片
- 24. 如何在instagram API中獲得性別?
- 25. 如何獲得instagram API的access_token
- 26. 我如何獲得Instagram API權限?
- 27. 如何從參數中獲取數據
- 28. 如何從URL獲取數組參數?
- 29. 如何從bind()獲取函數參數?
- 30. 獲取使用instagram api的權限
[如何獲取用於訪問instagram中用戶詳細信息的'id'](http://stackoverflow.com/questions/8800459/how-to-get-the-id-for-accessing-user-詳細功能於Instagram的) – 2012-01-10 12:38:30