Failed to Send error when sharing notes and pics - google-mirror-api

I have a mirror-api application i'm writing that takes notes, pictures and video from the users timeline and stores them. For some reason every note and picture I take and send to a contact i inserted through mirror has "Failed to Send" posted on the timeline card in glass. The app however still receives the timeline item. Anyone else having this issue?

You need to setup the timeline subscription (https://developers.google.com/glass/v1/reference/subscriptions/insert) with "UPDATE" item included in the "operation" list.
Mirror API will sending POST queries with the shared card info to your callbackURL endpoint. Accordingly your service should return HTTP Status 200 in response.
The endpoint should have HTTPS connection. To solve this - use ngrok (https://ngrok.com/) if you're developing on localhost or Google's subscription proxy (just google it, i can post more than 2 links now)

Related

Ionic App aborting request with response status -1

I'm using Ionic platform for my mobile application. Using angular
$http for sending requests to server.
Intermittently when Mobile app tries to access server $http goes to it's errorCallback with response status -1 only no other
data.
When I check log on server, not able to see any hit.
I've changed timeout of application to 2 minutes using interceptors.
I have used chrome debugger but it won't show anything apart from
request it forms, shows nothing in response and preview columns.
I got that in Ionic we use pre-flight to check if server is alive
before sending actual request. But it's for CORS; we have enabled
CORS on server and thats why app is working good since last 15 days.
Thought of using network packet tracer tool but if call not logged on
server no use of it. as Status -1 says $http aborted the request.
My Question is why it's aborting when I click once and do send
when I click same button again.
Please me help to figure out an issue.
After lots of debugging and surfing over internet for issue.
I guess that an issue was like mobile app sending pre-flight messages and so $http aborting the request and even some time Server played a culprit here how will tell you;
We have server hosted on AWS in where we had Load balancer in different zone and actual API server is in different zone. After changing them to same zone ask, production people to test now they are not getting this issue.
The another reason was we were using unstable mobile networks to test.
If any one have any thing else on this please let me know.

How can I get media from instagram API?

I'm using the instagram API to get some images related to an specific hastag but when I call the API I get a message saying the API is deprecated.
I'm calling this endpoint
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
Any idea on what call I need to make to return the list of images with the requested hastag?
So I figure out why this is happening. Because the application is still in sandbox mode I can only get hashtag from the accounts that have access. Once the application is approved it will be able to pull the data from the API.

Strange message from facebook messenger api

For some reason I receive message from facebook page (with connected bot):
"Thanks for messaging us. We try to be as responsive as possible. We'll get back to you soon."
But in bot app there is no such phrase.
Whether he can send a facebook message under some conditions (such as long response from webhook)?
I'm guesssing it's an old auto response setting for that page.
Go into settings and under Response Assistant, set both of these to No:
Stay responsive when you can't get to your computer or phone
Send Instant Replies to anyone who messages your Page

Google Calendars set to Auto-Accept any invitation are rejecting all invitations created by http request

I have two google calendars that I am trying to add events to programmatically through HTTP requests. I happen to be using iOS HTTP library, but I imaging that's largely irrelevant.
Both http requests are coming back as successes, but one calendar is declining the invitation.
It appears to me that they are both set up the same way, although I don't have admin access to them.
Is this more likely a calendar configuration problem that I can't see or is this an HTTP request problem?
Does anyone know the proper configuration settings for the calendars?
Edit: I asked for and received admin access to a pair of calendars, one that works one that does not. Both calendars have the "See all event details" preference selected

AngularJs: Respnd to Http post from third part server

I am developing an app using AngularJS and NodeJS. Being new to both I am struggling a bit.
My app is communicating with payment gateway to facilitate payments. Flow goes like MyApp-->Payment Gateway --> MyApp. I am able to send the request to payment gateway. Problem is I am not able to figure out how I will handle response that is coming from payment gateway. Payment Gateway is sending some data in the post request. I need to process this data before showing results of transaction to user.
Technically speaking I know what needs to be done. Like Step 1) Giving a return URL to Payment Gateway to which Post request will be sent. Step2) This HTML URL of my application will send data received from payment gateway to server side for processing. Step3) Based on processed results I will show transaction result to user.
Where I am struggling is show to achieve this using AngularJS and Nodejs. Pls help
You can use Angular's $http service to easily send and get data from server.

Resources