Instagram Subscription for Edited posts - instagram

I created an Instagram subscription https://www.instagram.com/developer/subscriptions/
My callback is hit every time a user creates a NEW post. Is there a way to know if a post has been EDITED? It doesn't look like this functionality is supported on the Instagram developer site and I cannot find a solid answer to this problem.

There is no way to be notified when a post has been edited. You'd have to store the post when you're first notified, and then poll it to check for changes (not recommended).

Related

Instagram Graph API - media_product_type not showing STORY

I currently have the below API response for one of our instagram pages using the Graph API that includes media_product_type, even though our Page has a STORY we are not seeing it come through, but we do see FEED and IGTV, see here for the documentation on this field. Has this happened to anyone else?
/12334555/media?limit=100&period=lifetime&fields=name%2Ccaption%2Clink%2Cshortcode%2Ccomments_count%2Cmedia_type%2Cpermalink%2Clike_count%2Ctimestamp%2media_product_type&access_token='blah'
You will need to use the stories endpoint (not media)
eg:
{baseUrl}/{version}/{instagramUserId}/stories?fields=caption,media_url,timestamp,permalink,username,media_type,like_count,comments_count,shortcode,thumbnail_url,video_title,media_product_type&limit=10&access_token={accessToken}
Note: story info is only around for 24 hours, so ideally you polls for infor and then setup the webhook to receive the final counts before the story dissapears.

Instagram - Get post comments

I did create a client in Instagram API but I'm in sandbox mode. My wife have a makeup store account and she is doing a giveaway and the rules is comment a post and mention another 3 friends. So, how can I get all the comments of the photo using or not Instagram API?
We have a web application in: www.beautyglamsd.com and I though that I can put the people that already are in the comments.
You can use service like this one to host your giveaway (works for Instagram, Youtube, Tiktok and VK). You can automate all tasks and save your time (check for like, follow, sponsors).

Instagram API throwing OAuthAccessTokenException 400 error using client id

I was using the following api to get the latest 3 posts from public accounts to show on the website:
https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3
I had created an app to get the client-id.
However from today, this API has started throwing the following exception:
{
meta: {
error_type: "OAuthAccessTokenException",
code: 400,
error_message: "The access_token provided is invalid."
}
}
Could you please let me know as how to resolve this?
Based on the date, you probably have an older app that got hit by the API migration today, like mine. In short, Instagram decided to make developing for their platform WAY more annoying by requiring all API requests to be authenticated per user, even for data that users shares publicly. So you (like me) will likely be redesigning you app entirely.
To tell, log in to instagram.com/developer and click manage clients; then hit edit next to the set of keys your're trying to use. Up near the top, it will have a section called 'Client Status' -- if yours reads 'Sandbox Mode', fun times ahead! Hopefully you interact with less than 10 users and can stay in sandbox mode, otherwise you'll have to write an essay, film a video, and basically plead to get your permissions back (probably in a few months, when some Instagram intern finally digs his way down to you in the pile of applications). If it reads something eles, you've got another problem altogether and should thank your lucky stars.
In the meantime, I guess I'll get back to sending out dozens of emails to the maintainers of our many, many affiliated Instagram accounts to explain the issue and try to get permissions, so provided we get approved by then, all our social media displays aren't broken during a huge event Saturday. Another option might be to use the OAuth-less json response available here, but that might break terms of service.
I have a solution to this. If you are using the same code I am, which appears likely. I was pulling the last two images using this.
https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3
What I did to get this working is the following.
Login to your Instragram account you are using as the application.
Go to the developer (API) area. https://www.instagram.com/developer/clients/manage/
Manage clients. Make sure your website URL is the same as your valid redirect URL.
Add new Sandbox User. Put in the account of the IG photos you want to reach.
Hit this URL: https://api.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT_URI&response_type=token where the client ID is the same one you used in your previous app above.
You should get back and access token URL. Copy your access token.
Login as your account that you want the IG photos of. The account you added as a sandbox user and go to developer and approve the Sandbox Invites.
Change your original URL above from https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3 to https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS_TOKEN with your access token.
This is the IG API Media endpoint documentation: https://www.instagram.com/developer/endpoints/users/
After that, it all worked for me and while you are in the sandbox, you should be able to pull the last 3 photos or at this point, figure out how to read the JSON to do so.
Has your app been approved after the June 1st Instagram platform changes?
http://developers.instagram.com/post/145262544121/instagram-platform-update-effective-june-1-2016
If you want to retrieve the user media file then try this, It's working for me
https://graph.instagram.com/me/media?fields=id,caption,media_url,media_type&access_token=ACCESS_TOKEN
For some reason the token is no more valid. Request it again.
Possible reasons why a token is no more valid:
changed password
verified the account
logged-in from a different country

Application Registration to use End Points (Likes, Comments, Relationship) with Instagram

I want to request approval for using the End Points of LIKES, COMMENTS and Relationships in my application via instagram API.
In order to do so, i am filling the form given at following link in order to get the approval from Instagram
https://help.instagram.com/contact/185819881608116
After i fill all the information along with screen shots and click send, it doesn't give me any confirmation of receiving details of my application or send me any confirmation email.
Instead it takes me Help page at "Something's Not Working". First time, i thought i made a mistake and second time i tried after log in to my Facebook account but same thing happened again.
Please confirm if any body faced the similar situation and got a solution.

Send alerts when post is read

I'm wondering whether SharePoint can send alerts to the administrators when blog posts get read. We want to track how many people (if any at all) are reading technical blog posts.
I have found a way to set alerts for when items change, but not when they get viewed.
No, this would not be possible with a "simple" solution - as in out-of-the-box. There is no "viewed item" event in any way.
You would either have to tap the SharePoint Analytics database and check when a specific user has viewed a specific page and upon that event send a mail. You most likely would have to code a timer job for that which checks in regular intervals for this.
Another (simpler) method would be to just have a small WebPart embedded on the blog post page which tracks who has viewed the page and sends alerts.
You should rethink what you are doing in any case. There is no good measure of when somebody really has read a blog post. Did somebody read the blog post if he just entered the URL? Maybe the click was an error and the user leaves the page right away. Maybe you only activate the "read" flag after a certain amount of time - how would you determine the time spent in the stateless web? With a JavaScript timer being started when the user arrives at the page, stopped when he leaves the page? How would you send the "stop" signal if the user just closes the browser?
You can track if a user visited a page - that does not mean he read the article / blog post. The only sure way to do that is to include a button on the page which says "I have read the blog post". Again, this button can be faked, i.e. just clicked without reading, but you have the users' word that he read the blog post. This would be the third solution and in my eyes best solution to track who has read a blog post: Implement a button which allows the user to mark a post as read. This could even be implemented nicely with a tracking-list, that list in turn could be subscribed to by an admin who would get automatic summaries of who has read an article, who hasn't.

Resources