What draw the borderline of abusive use of Facebook Chat API - facebook-chat

The facebook chat api is a power tool. From a purely technically point of view, it definitely does more than its predecessor of private messages in the Graph API.
This brings up a question of where Facebook is drawing the line of abuse of its chat api.
So here's how I'm planning to use the Facebook chat api for my app.
The app is an event planning app that lets users invite their friends to an event. Other than sending SMS, and emails to notify the guests, the most reliable way is to send invitations through the list of facebook friends. And let's face it, sometimes you may not have the person's phone number in your contact book, and you definitely don't remember most of their emails, so facebook is your only source for reaching them.
So I need a solution to send invitations to the guests. Here are my requirements and conditions:
The guest is a facebook friend of the user
There's no way of obtaining the guest's email (unless the user enters it) or phone number (ie. sms is not an option)
Each guest must receive a link that is unique to him/her
No one else should be able to obtain this link (ie. the message shouldn't be seen publicly)
It must not require the user's interaction to send these invitations (imagine having the user confirm a facebook post 10 times for the 10 facebook friends he's inviting). The invitation must be sent automatically.
Here's the obstacle. Facebook had revoked the functionality to send private message recently (I was able to have my facebook friends send me private messages via an app just over a month ago, not anymore). However, I discover that I could do so using Facebook Chat API.
This seems to be a grey area, my app is using the chat api for the sole purpose of helping the users notify their friends of their event invitation. There's no intention of abuse (such as mass messaging everyone of the user's friends with a link to my APP/website). Is Facebook going to hunt me down and revoke my App's privilege to use Facebook's API?
Can anyone shed some light on whether my intended usage of the API is an abuse or is it legitimate? If it is not legitimate, what are your suggestions.

I'd recommend using core functionality wherever possible here. For example, you could utilise the Facebook 'Event' object and the Graph API to create invite-only events and to invite individual friends of your app's users. This would deliver the same functionality without the need for nonce-based invite URLs and possible misuse of the Chat API. Take a look at https://developers.facebook.com/docs/reference/api/event/#invited for details.

Related

Send a Google Chat message from a regular account (not a bot)?

I'm trying to send a notification out using Google Chats. But I have a few problems with the documentation I've been able to find:
It requires me to have a paid service account, which I do not have, and will not be getting
It requires using a chat bot, which (in my understanding) needs to be added to a room, and cannot just send out messages
Chat bots can't send out messages directly to personal accounts?
I'm already using Google OAuth2 authentication to access another Google API, so I'd like to use a Google API to send messages directly from the authenticated account. How would I do that?
So far:
All the documentation I can find is about making a chat bot.
I've considered some alternatives to sending out messages, but due to corporate device restrictions that will not be changing, google chats is my best option.
At the moment what you're trying to do is not possible, for multiple reasons.
You may know this already, but Google Chat is an upgrade to their old "Classic Hangouts" chat. In Google's own words, this is focused on enterprise (i.e. paid) accounts. While personal accounts are also able to upgrade and get some of the benefits, their documentation shows that Google Chat for personal accounts is very similar to the old Hangouts and most of the new features are meant for the paid accounts. This also includes the use of bots.
As you've observed, the Chat API currently only has methods to create and manage bots. There are no methods to send messages as your own account. This could be to prevent spam or because their Chat API is relatively new, since the Classic Hangouts did not have an API, and Chat hasn't fully replaced it yet. Even then, given that Chat is "enterprise-focused", it is uncertain whether or not personal accounts would get access to any new API features.
You could try to post feedback on their issue tracker or request the feature to see if you get a response, but for an immediate solution you may want to just use the Gmail API to send a regular email or reconsider the other alternatives that you had in mind.

Getting contact list, profile pictures and emails from Google APIs

There are a few questions on individual components of "Sign in with Google" floating around, but I can't find any that refer to the current API (as of July 2015).
I have a "Log In with Gmail" option in my webapp, and I'd like to retrieve:
All emails that I've ever sent and received (if possible)
A list of all my contacts
A list of all my contacts' profile pictures (and any other info that may be possible, like location, gender, age etc)
Right now, in my oAuth login I use the following scope:
['profile', 'email','https://www.googleapis.com/auth/userinfo.profile', 'https://www.google.com/m8/feeds']
Then once I have my oAuth token, I make the following API call:
https://www.google.com/m8/feeds/contacts/default/full?max-results=10000&alt=json&oauth_token={{token}}
This give me a list of contact emails and associated names, but no pictures (at least that I can find) and no other info about contacts.
I'd also like to be able to download all of the user's sent/received emails, I understand that I have to do this via IMAP but I can only find NodeJS implementations that require a username and passwords. Is it possible to do using an oAuth token?
Ideally I'd like to do this all with the one oAuth call, as I'm building an email analysis tool.
Gmail provides an HTTP API you can use to access all of a user's sent and received emails.
The Contacts API is basically only information the user has manually entered for the contact. Most users aren't going to be entering age and gender and contacts will only have locations if the user treats it like a traditional address book.
If you want to get something more like a social profile you might want to check out the Google+ people.list API. You will have to find a way to correlate between contacts and Google+ profiles but Google+ profiles are more likely to have photos demographics data.

Get list or count of registered users for application

Using Instagram's API, is there any way to request a list or count of an application's registered users?
Instagram's real-time subscriptions can send notifications whenever a registered user posts to their feed, but I haven't found a way to get a list of those users, or even a count. This is easy enough to store server-side, but seems like something which should be discoverable.
Your Question
Using Instagram's API, is there any way to request a list of an application's registered users?
A quick search yielded no results for such a functionality. This make sense, though, since Instagram wouldn't want to open up all its users to any app designer.
Your App
If you want the number of users using your app, then you can easily track this yourself.
Instagram App
As mentioned before, Instagram probably won't provide even basic count information about its registered users. Presumably, this is valuable information.
Your Example
Instagram's real-time subscriptions can send notifications whenever a registered user posts to their feed...
This is true, but with very limited scope. The subscriptions below are based on users who are using your app or other simple criteria such as tags or geographic data.
Users: receive notifications when users who have registered with your application post new photos.
Tags: receive notifications when a new photo is tagged with tags of your choosing
Locations: receive notifications when new photos are posted and tagged with a specific location
Geographies: receive notifications when a new photos are posted in an arbitrary geographical location as defined by a center point
and radius
As far as I have found this far there is no IG API, however as already indicated you can keep track on your app. HOWEVER, what has not been pointed out is that you won't be made aware if users terminate their account or revoke your app so the count's might be a little off. (or worse if you didnt start keeping track since the public launch of your app)
You could test on a periodic basis if you still have access, but that would require additional code, and a lot of API calls if you app has a lot of users. I hope that IG will add this function at some point.

Is Google Wallet API will allow multiple recipients during a single transaction

I am implementing Google Wallet API integration with PHP website. Seems there is no way to add multiple recipients during a single transaction. please let me know if there is any way to do this.
Probably needs some clarification from OP so subject to that clarification:
Google Wallet for Digital and/or Instant Buy, yes, there is only one payer (the Google Wallet account/user who will pay)
recipient however seems to be up to you/your app, more so with Instant Buy since control of the transaction/order flow is handed back to you/your web site. Google (Instant Buy) just handles part of the payment flow (not the entire order/transaction process)
Hth

How to invite friends to an event? Facebook Graph API in iPhone

I am working in Facebook application in which I have created event Successfully, I am getting name.place, start_time, endtime property from api. But my problem is to send events invitation to Facebook friends, for this I am finding lot of details but that not help much.
Like you I have figured out how to create the event. However I am not sure how to get the event id. If you can tell me how to do that it would be great.
Bad news is it looks like Facebook has yet to implement the invite functionality using the Graph API.
http://developers.facebook.com/docs/reference/rest/events.invite/
Hope this helps.
see Inviting selected users to Facebook-Event (via Graph API)
Facebook now has a graph api for inviting friends to events.
http://developers.facebook.com/docs/reference/api/event/
invited
Create
You can invite users to an event by issuing an HTTP POST to /EVENT_ID/invited/USER_ID. You can invite multiple users by issuing an HTTP POST to /EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3. Both of these require the create_event permission and return true if the invite is successful.

Resources