I'm making an iOS application, that needs integration with Facebook Workplace for users can manage their private data (messages, posts, etc).
As I understand I need an app inside admin panel to be created, set up permissions for it, generate app access token for API calls.
With the token we can fetch information about groups and members existing in community. We can fetch information about specific member groups with member access token (impersonate token), which we can get with user id.
We need an authorization to get the user id. We can login to Facebook with iOS SDK, but facebook login and facebook workplace login are two different entities. I couldn't find anything about authorization in Facebook Workplace.
Is it possible at all? I think it should be, because this page exists and all API calls require some code and token that had to be somehow retrieved previously: https://developers.facebook.com/docs/workplace/reference/account-management-api
Related
I am creating an iOS app for internal use. We have a Google Domain. As part of the functionality of the app, I want to be able to search for all users in that domain. This can already be done in Gmail, the Apple Mail app, and others.
I found that you can use the Admin SDK for users.list to do exactly what I want to do. I created a Client ID for the iOS app and authorized my app to perform users.list.
However, now I get a permissions error for users who sign in with OAuth2:
I found that you can create a service account to make API requests on your behalf if you delegate it to have the authority. I'm not sure if this is what I want to do since this seems more like something for a secure server to do rather than an app. I'm also not sure how this integrates with a user (from our domain) who signs in with OAuth being able to list our users.
Is it possible to list/search the users in a Google domain purely through OAuth / frontend app?
Aside from caching your own list, I think there are two ways to give users the ability to list all users:
A. Undocumented call to this GAL API:
https://www.google.com/m8/feeds/gal/your-domain-goes-here/full?alt=json (source). You can test this in the Google OAuth Playground by selecting the scope for the Contacts V3 API or using the string https://www.google.com/m8/feeds/.
B. In the Admin console, create an "all users" group. Assign to a newly created Admin Role. Grant the admin role "read" in Privileges > Admin API Privileges > Users > Read (checked).
I'm building an app that shows users people they might be interested in talking to. If a user says he's interested in a person I show them, I want my app to create this person as a contact in my user's SalesforceIQ.
How do I do this? I see from the API documentation https://api.salesforceiq.com/#/ruby#documentation_contacts_create-a-contact that I can create a contact if I know my user's username and password, but of course I don't want my users to give me this information. Is there some way for the user to OAuth or whatnot by clicking a button that authorizes me to add things to their SalesforceIQ?
The SalesforceIQ API uses HTTP Basic authentication and does not currently support OAuth according to their documentation.
For a SalesforceIQ user to grant API access to your app to create contacts and for other privileges, the SalesforceIQ admin creates an API Key and API Secret for your app which is then used for the HTTP Basic authentication username and password. This way no user needs to provide your app with their credentials. This is configured in the SalesforceIQ admin UI under Settings > Integrations > Create New Custom Integration.
For the admin to provide these credentials to your app, you can have a UI where the SalesforceIQ admin enters this for your app to store and use with the API for their account.
This is described in the following places, briefly in the API Reference and in detail in a Help Desk article with screenshots of what the SalesforceIQ admin needs to do:
API Reference: Requesting Access
API Reference: Security and Authentication
Help Article: Set up API access
Is it possible to get Tweets/Facebook posts using the iOS Social Framework without using Facebook or Twitter accounts?
Not possible to query data without active account.
You can create new SLRequest, even set its parameters with valid FB access token but you will still need to associate the request with valid, accessible account.
See the example of the possible request here
For FB queries, You can use the FB SDK to perform the queries without active user login using access token generated for your facebook app, I can explain more about it if needed.
I'm working on my first rails app and am trying to make it so that Users can create a joint Playlist and then play that playlist. I planned on using Hallon/Libspotify to create the playlist but am running into a problem because Spotify requires users to login with FB.
I currently have it set so that Users login to the site using Facebook but I don't think the information FB gives me is enough to auto log the User into Spotify. Any suggestions on how to implement this functionality would be super appreciated!
You can't use a Facebook auth token with libspotify.
libspotify requires a username and password pair, whether it's a Spotify name/password or a Facebook name/password. Once you log in with libspotify, you'll be given a separate login auth token for storing and future logins.
It's important to abide by the libspotify ToS when writing your app, as it's easy to break them when writing a web app. The two most important are:
Never store a username/password yourself. Only ever store the token you get (it's safe to store unencrypted).
Never log in on behalf of the user when they're not using your application.
I'm learning to use the twitter API for the first time. I want to build a website that allows users to post messages to their twitter, facebook and linkedin account. They will need to sign up first via the website's registration/authentication system, which is in not related to twitter, facebook and linkedin. Once logged in, they should be able to synchronize their twitter, facebook and linked in account with my website.
I'm starting development with twitter first. I followed this tutorial here:
http://www.1stwebdesigner.com/tutorials/twitter-app-oauth-php/
After authenticating, twitter sends me to this url.
http://mywebsite.com/?oauth_token=o7gIh4x8xAs1mcms6OKthLoLecL99WVbky2Gu6o4no&oauth_verifier=83Ip3jrMVDvnbIY3RXS5DH1FUZrWAHddwApnOBfm4
The first time this page loads, it properly retrieves all the authenticated user info. But when I refresh the page, the all the user info disappears.
My question is:
Are the query string parameters oauth_token=o7gIh4x8xAs1mcms6OKthLoLecL99WVbky2Gu6o4no&oauth_verifier=83Ip3jrMVDvnbIY3RXS5DH1FUZrWAHddwApnOBfm4 all that's needed to gain write access to a user's twitter account? Can I store these tokens in my database so that the user never has to be prompted to sign into twitter again?
You had better keep oauth_token (and oauth_token_secret too) in your database since you will use them for all the authenticated requests you will do for the authenticated user. As for oauth_verifier, it is a parameter only used during the OAuth Authentication flow. So you can get rid of it once you have got the final tokens.
For further details (and to ensure what you are doing is right), see the corresponding "Sign in with Twitter" page on Twitter Developers website : https://dev.twitter.com/docs/auth/implementing-sign-twitter.