在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:potomak/jquery-instagram开源软件地址:https://github.com/potomak/jquery-instagram开源编程语言:JavaScript 93.2%开源软件介绍:jQuery InstagramSelect and show a list of Instagram photos. Getting StartedDownload the production version or the development version. In your web page: <div class="instagram"></div>
<script src="jquery.js"></script>
<script src="dist/instagram.min.js"></script>
<script>
jQuery(function($) {
$('.instagram').on('willLoadInstagram', function(event, options) {
console.log(options);
});
$('.instagram').on('didLoadInstagram', function(event, response) {
console.log(response);
});
$('.instagram').instagram({
hash: 'love',
clientId: 'YOUR-CLIENT-ID-HERE'
});
});
</script> CDNProduction version: //cdnjs.cloudflare.com/ajax/libs/jquery-instagram/0.3.1/instagram.min.js Development version: //cdnjs.cloudflare.com/ajax/libs/jquery-instagram/0.3.1/instagram.js Note: please don't use RawGit as a CDN, see The naughtiness score for more info about this issue. For Rails developersYou can use "instagramjs-rails" gem by bodrovis (https://github.com/bodrovis/instagramjs-rails) to easily add Instagram.js to your projects. Add this line to your application's Gemfile:
And then execute:
In your
DocumentationAuthenticationYou can obtain a client id registering a new Instagram API client app at http://instagram.com/developer/clients/register/ OptionshashGet a list of recently tagged media. See http://instagram.com/developer/endpoints/tags/#get_tags_media_recent Authentication: Type: Default: userIdGet the most recent media published by a user. See http://instagram.com/developer/endpoints/users/#get_users_media_recent Authentication: Type: Default: locationGet a list of recent media objects from a given location. See http://instagram.com/developer/endpoints/locations/#get_locations_media_recent Authentication: Type: Default: Parameters:
searchSearch for media in a given area. See http://instagram.com/developer/endpoints/media/#get_media_search Authentication: Type: Default: Parameters:
accessTokenOAuth 2 access token. See http://instagram.com/developer/auth/ Type: Default: clientIdOAuth 2 client application id. See http://instagram.com/developer/auth/ Type: Default: countNumber of photos. See http://instagram.com/developer/endpoints/#pagination Type: Default: Note: Instagram is filtering out private users' photos at read-time, so you won't always get the full number of photos in the count, see also #14 and https://groups.google.com/d/msg/instagram-api-developers/nKik4i8OYhw/ENu79JbcBAEJ Note: pagination doesn't work for requests to urlYou can populate this with the next URL object ( Type: Default: EventswillLoadInstagramTriggered just before making the request to instagram API. Params:
didLoadInstagramCalled after the response from instagram API. Params:
ExamplesGet a list of what media is most popular at the momentSee http://instagram.com/developer/endpoints/media/#get_media_popular $('.instagram').instagram({
clientId: 'YOUR-CLIENT-ID-HERE'
}); Get a list of recently tagged mediaSee http://instagram.com/developer/endpoints/tags/#get_tags_media_recent $('.instagram').instagram({
hash: 'love',
clientId: 'YOUR-CLIENT-ID-HERE'
}); Get the most recent media published by a userSee http://instagram.com/developer/endpoints/users/#get_users_media_recent $('.instagram').instagram({
userId: 1574083,
accessToken: 'YOUR-ACCESS-TOKEN-HERE'
}); Note: this API endpoint needs access token authentication. Get a list of recent media objects from a given locationSee http://instagram.com/developer/endpoints/locations/#get_locations_media_recent $('.instagram').instagram({
location: {
id: 514276
},
clientId: 'YOUR-CLIENT-ID-HERE'
}); Search for media in a given areaSee http://instagram.com/developer/endpoints/media/#get_media_search $('.instagram').instagram({
search: {
lat: 48.858844,
lng: 2.294351,
distance: 2000
},
clientId: 'YOUR-CLIENT-ID-HERE'
}); Release History0.3.1Add options default values, see #52. 0.3.0Plugin redesing. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论