instagram

Saving Items In Mongoose For Loop With Schema Methods

℡╲_俬逩灬. 提交于 2019-12-01 22:02:05
问题 I'm having a problem saving items running through for loop if I attach any extra validation methods. Basically, I'm building an instagram API app that allows editors to remove photos that are unseemly. Photos are pulled from Instagram in batches of 20 and displayed to editors. If an editor clicks a photo, it is first put on a 'blacklist' database by ID, then deleted from the main photo database. In order to not have blacklisted photos reappear on the feed, before saving an item to the main

Get a list of users who have liked specific media on Instagram

一个人想着一个人 提交于 2019-12-01 21:39:06
Using Instagram API I need to get a list of users who have liked specific media. The following call should return the list of all users according to the documentation: https://api.instagram.com/v1/media/555/likes?access_token=ACCESS-TOKEN However, I get only 120 users with no pagination parameters. Is there any way to keep requesting the rest? If you need the code: String requestLikes = "https://api.instagram.com/v1/media/" + mediaID + "/likes?access_token=" + access_token + "&count=0"; // Create a request for the URL. request = WebRequest.Create(requestLikes); // Get the response. response =

Instagram API media/search/ endpoint return results outside the time range

放肆的年华 提交于 2019-12-01 18:13:14
I'm currently using Instagram API media/search endpoint using this following sample configuration: curl -XGET 'https://api.instagram.com/v1/media/search? lat=1.3058866783157643&lng=103.88191223144531&distance=5000& min_timestamp=1394615197&max_timestamp=1394615227& access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' The highlights of this command are: min_timestamp = 1394615197 max_timestamp = 1394615227 The results that I obtained has these following created_time field: (I don't put the raw result because it will consume lots of space. I use jq ( http://stedolan.github.io/jq/ )

Share video and sticker Image to Instagram Story on Android

风格不统一 提交于 2019-12-01 17:35:58
How can I share a video as a background and an image as a sticker together to Instagram Story? This documentation has only one solution if both contents are images. https://developers.facebook.com/docs/instagram/sharing-to-stories/ I would like to send a background video together with a sticker image. Is that possible with Instagram Story? I tried that, but unfortunately it didn't work: // Define image asset URI and attribution link URL Uri backgroundAssetUri = Uri.fromFile(new File(backgroundPath)); Uri stickerAssetUri = Uri.fromFile(new File(stickerPath)); // Instantiate implicit intent with

Switch user or re authenticate with Instagram

旧街凉风 提交于 2019-12-01 16:10:48
Following the Instagram documentation I'm able to authenticate a user and retrieve an access_token easily But now I want to change of Instagram account which is impossible since the browser automatically call my callback URL because I'm already signed in with an account (there is no login / authorization form again) To explain what happen here is the authenticate / authorization flow : Open a browser asking user to log and authorize User fill up form and submit (this step is skipped when user is already signed in !) Browser redirect to callback URL You see step 2 is skipped so we can't login

Switch user or re authenticate with Instagram

冷暖自知 提交于 2019-12-01 15:08:00
问题 Following the Instagram documentation I'm able to authenticate a user and retrieve an access_token easily But now I want to change of Instagram account which is impossible since the browser automatically call my callback URL because I'm already signed in with an account (there is no login / authorization form again) To explain what happen here is the authenticate / authorization flow : Open a browser asking user to log and authorize User fill up form and submit (this step is skipped when user

Adding a query parameter to the Instagram auth redirect_uri doesn't work?

狂风中的少年 提交于 2019-12-01 14:24:44
问题 Steps to reproduce Register a redirect_uri in the client: http://example.com/publisher/auth Direct a user to the /oauth/authorize endpoint with the redirect_uri including a query parameter: https://api.instagram.com/oauth/authorize/?client_id=xxx&redirect_uri=http%3A%2F%2Fexample.com%2Fpublisher%2Fauth%3FinviteId%3D00001000-cf33-11e4-9f26-8789dd0b3e01&response_type=code&scope=basic&type=web_server For reference, those query parameters are: client_id=xxx redirect_uri=http%3A%2F%2Fexample.com

Caching Instagram API requests using PHP?

北慕城南 提交于 2019-12-01 12:54:48
问题 Here's my current script that does the API calling: $client = "55447265ed444bb5b768ecb0765ba9cb"; $query = $_POST['q']; $clnum = mt_rand(1,3); $api = "https://api.instagram.com/v1/tags/".$query."/media/recent?client_id=".$client; function get_curl($url) { if(function_exists('curl_init')) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT

Adding a header and a footer to a gridview in Android

[亡魂溺海] 提交于 2019-12-01 11:37:04
问题 I am trying to create users' profile pages in my Android app with the following features: - header - gridview showing a bunch of photos from that user - footer (a downloading icon when the app is downloading more photos in the gridview) - the header needs to move together with the gridview In other words, the user experience on the profile page would be very similar to the user experience in an Instagram user profile page. The issue is that gridview does not support headers and footers. Any

Getting Instagram subscription JSON data from post in PHP

笑着哭i 提交于 2019-12-01 11:18:06
This whole process of subscriptions for the Instagram API seems to be less than straight forward. I have some code set up to receive the post data sent when Instagram hits me with a notification of a post from one of my subscriptions. However when I try to view the data, the raw JSON, it posts I can't get at it. If I print_r or var_dump I just get the number 1. See my code for accessing the data: // Catches realtime updates from Instagram if ($_SERVER['REQUEST_METHOD']==='POST') { // Retrieves the POST data from Instagram $update = file_get_contents('php://input'); $data = json_decode($update)