Alexa account linking using facebook - facebook

I am trying to build an alexa skill, that would have facebook login as an account linking provider. I have built a development version of it that is working with my own account. Now I am thinking of submitting facebook app for review, so I could make my app public and publish alexa skill.
First probably that I encountered is that, I need to specify platform in FB app. The closest one to my use case, might be website. But what url to put in the field. My skill url?
The other thing, is that I want to get users friend-list, which use my app. This scope requires user permission. To get it I have to write how am I going to use that data, how to test it and provide a screencast how it works. There are bunch of requirements like, the button to the login page has to be in FB style, while in alexa app it is just a simple link to login page. Also how to write, testing instructions?
The more I think, the more it seems that it is impossible to have FB service as the account link service for alexa skills. Maybe someone has succeeded to build a working live skill with FB as account linking service and can share your experience?

What url to put in the field. My skill url?
Yes, but I doubt how a "website" is the closest match to your usecase.
write how am I going to use that data
Answer how your skills uses the users friend list, why do you want it and how it adds to the user experience of your skill.
the login page has to be in FB style, while in alexa app it is just a
simple link to login page.
This should be fine, mention how login works in Alexa and how your skill users get redirected to FB login page.
how to write, testing instructions?
Write it step by step and as easy as possible, just like how somebody is going to use it. Create an Amazon test account and add it under beta testers in you Alexa skill. Share this test account along with the instructions.
The more I think, the more it seems that it is impossible to have FB
service as the account link service for alexa skills.
Give it a try, it should be certainly possible. I would have tried it like this.
And wait for their reply. If there are any mistakes or they need any other data/instructions/clarifications, they would hopefully leave a comment.
PS: I don't have any experience in submitting a Facebook app. Checkout other answers as well, this is just my suggestion.
All the best.

Related

Link multiple accounts iOS app - Firebase/Facebook Login & XCode/Swift 5

So I'm building this app for a client (It's a basic scheduling app like HootSuite but simpler) and he wants the ability to add multiple Facebook accounts with an IAP (aka In-App Purchase) after said IAP is purchased. The IAP is all done and works great but I cannot figure out how to link multiple Facebook accounts. I tried to use the same login method that a previous developer used (It's an ongoing freelance project and 2 other devs worked on it before I joined) to no avail since the login process stops once the app realizes that the user has already signed in...
So I guess that my question is this: Is there a way to link multiple Facebook accounts at once in a single iOS app? If so, how exactly? Forget the IAPs if that's too confusing, everything is fine there anyways. The goal is to be as seamless as possible, so ideally there would be no need for the user to log out and log back into the other account (Something I've seen a lot in other Questions/Answers).
I don't think I am authorized to show the code to you guys (that would also require sharing the entire project, it's a real spider-web!), but could someone please lead me in the right direction?
Please let me know if you have any questions!
Thank you in advance.
Notes:
Just like the title says, we use Firebase for our storage, Cloud Firestore for our database and Facebook login (through Firebase) for login since the purpose of the app is to schedule posts on IG.
I use a basic variable called "activeUsers" to track the number of accounts "linked" to the app so we can know whether or not to show the "PurchaseModel" and, obviously, receipt verification and all that for IAPs. Thought it could be useful!
3. When the app starts, you are prompted to link a Facebook account to enable the scheduler. THIS WORKS GREAT! What I am trying to achieve is to add other accounts AFTER the first one has been "enabled"/logged into.
It's not possible to link multiple accounts from the same provider to a single Firebase Auth account.
You can only link multiple accounts of different types (Facebook, Google, GitHub, etc) to a single Firebase account as described in the documentation.

Facebook periodic review is unclear

in order to approve your app’s continued operation on our platform.
Platforms affected: Connect URL.
Developer Policy 1.2: Build an app that is stable and easily navigable.Some common violations of this policy include:
- Broken Facebook integration (e.g. broken share, like or comment functionality)
- Broken user experience in the app (e.g. app has broken links or user interface failures)
My app:
Using https://www.npmjs.com/package/hellojs v1.18.8 to query user info from facebook.
The request URL:
https://graph.facebook.com/v2.9/me?fields=email,first_name,last_name,name,timezone,verified&access_token=.....
calling out hello.js
hello(auth.network).api('me').then(function (json) {
App has no share, like, comment functionality and not really any user interface. Just our page offers ability to fill some data with facebook and then it remembers you with cookie.
Anyone has similar e-mail and what to do?
Our app does not use share, like or comment functionality neither do we provide any user interface for users (only the o. We are using Facebook to prefill some user data on our site.
Have the same unclear message "Platform affected: Connect Url".
I asked for a more detailed answer and received an answer the next day:
Thank you for your response.
Facebook periodically reviews the websites and applications which are on it. Your application is in its review process currently. We are required to test the Facebook login functionality in order to conclude the review in totality. However, we are unable to do so.
Unfortunately, we have not been able to locate a Facebook integration (Login, Share and Like) on your submitted platform. To help us conclude the review process, could you kindly share the details regarding the location of a Facebook integration and how to navigate to it on your website URL.
This review is essential to Facebook as we want to offer the best experience to users as well as developers like yourself. Please help us in bringing your application into compliance by working with us.
Alternatively, you could aid us by sending us credentials of a test user which is already registered and connected to an FB account within the app. You can get all the information related to creating a test user here - https://developers.facebook.com/docs/apps/test-users.
Please feel free to get in touch with us regarding any doubts or queries you might have.
Thank you for your patience and cooperation.
Looking forward to hearing from you.
My app contains the functionality of a facebook login. I made an instruction and a test user of the application so that Facebook employees could test the functionality used in my application.
Normally they write down what is wrong and explain how to fix it. If you are not sure you can reply them back and ask how to fix it. I manage to fix my issue which was similar to the one explain below by emailing facebook.
https://technuisance.com/facebook/facebook-policy-warning-for-app-solved.html
I got the same message from Facebook two months ago. In my case, I didn't find a solution in time and Facebook penalize me by deactivating the app.
Therefore, you must attend to it if you do not want the same to happen to you. Facebook uses software similar to this to check for failures on your site and assigns a score according to its performance. That's why they send you such a generic message.
I suggest you use PageSpeed Insights to receive a report on the performance of your website. In addition, the platform gives you suggestions for optimization and improvement; Surely there you will find some clue of what may be failing.

Google assistant account linking with facebook

I'm trying to make a chatbot with Dialogflow for Google Home. It requires the user to input a URL. Now it will definitely be a long and complicated URL which I can't recreate and I can't have the user speak into the google home.
The idea I had was that the user would input the URL on an agent on messenger. I store this on a Firebase database and then access it with a second agent.
Now the issue I have is authentication, I was hoping to use account linking on my google action with facebook. But I can't login to Facebook with google home. Or if I can, I can't find any documentation specific to that case. Facebook doesn't provide the necessary client ID and secret(as far as I can see).
I managed amazon and Gmail account linking with Alexa and an Amazon Echo. In those cases, you would have to login to google or amazon on the Alexa app or webpage. Then this will be integrated with your Echo and the skill will become usable.
Anyone have an idea of how I can make the link happen, if not then anyone have an idea as to how I can solve the overall problem?
This question has been left unanswered on other forums, but I was hoping to either get it solved or find an alternative.
There are three approaches to solving your overall problem - getting the URL manually entered and available to your Action. Two of them tackle it the way you've suggested - involving authenticating to Facebook and tying that to the Assistant account somehow. One solves it entirely inside the Assistant.
Account linking to the Facebook account
You've tagged firebase-authentication, so I'm going to assume that you're using it to do the auth and you've enabled Facebook login through it. This means your user has a "Firebase Account", but they log into that account using Facebook.
I will assume you have a way to get the URL from messenger once they're logged in.
The trick in this case is to setup Account Linking between their Firebase account and their Assistant account. This is done by setting up an OAuth2 server that has access to the Firebase accounts and will create authorization and refresh tokens that are given to the Assistant.
In the Action, you'll send the user to the Sign In helper, which will redirect them to your login page and send back a one-time auth code to the Assistant. The assistant will then use your OAuth2 server to exchange this code for auth and refresh tokens. Periodically it will use the refresh token to get new auth tokens.
When the user returns to the conversation through the Assistant, you'll be handed an auth token and you can use this to lookup the user. Since you also know their Facebook account, you can get the URL via however you planned to do so.
There are drawbacks to this method - it is very complicated, and setting up your own OAuth2 server is not for the faint of heart. You may be able to use something like Auth0 instead of Firebase Authentication to accomplish the same thing, but then you don't have the ease of access to the Firebase database.
Account linking to both Facebook and Google
In your Firebase account, however, you don't need to limit them to just logging into Facebook. You can have them use Firebase to record both the Facebook and Google accounts that they're using. This would "link" the two accounts together in your system.
With this, you don't need to setup an OAuth2 server. Instead, you can have the Assistant use Google Sign In for authentication. If the Google Cloud Project that Firebase is using and the Assistant are using are the same project, then once the user has logged in to your project's web page with their Google account, you'll get an identity token on the Assistant which will contain their Google ID. You can use this to match up with their Firebase account and get the Facebook ID and proceed from there.
But this is still a lot of work and kinda messy, jumping between systems.
Using just the Google Assistant (and maybe a web page)
If you're willing to make some assumptions about the devices your users are using, then you may be able to do it all just using the Assistant. The Assistant doesn't just run on the Google Home and other smart speakers, it also works on most current Android and iOS devices.
So you can detect if they have such a device available and, if they do and they're not currently on it, direct them to switch to that device when you need the URL.
If they don't have such a device available (perhaps because their version of Android is older), and you think this may be a common scenario, you may need to make another entry source available. This could be one of the solutions above, or you may want to just have a simple web page (done via Firebase Hosting and Firebase Functions, perhaps) where they log in using their Google account (so you get their ID) and you let them enter the URL. If you just need a URL - going through Dialogflow may be more complexity than you need.

How can I test and develop my app without submitting it for review?

I am developing a new social media management tool which integrates Facebook. It works sort of like postplanner.
My app helps people manage pages better.
I need posting and page management permissions to test and develop my app, but whenever I try to give these permissions to my Facebook id (who is the administrator on this app), Facebook refuses to do so, and asks me to submit it for review.
I saw the review section and it seems that the app needs to be complete to submit for review.
How can I finish my app if I can't test page posting?
I tried creating test users in Facebook, but these test users can't create test pages, and that's why I can't use them.
I don't know what's going on here... Any clues help will be much appreciated.
Facebook gives a disclaimer above the permissions dialog, as the developer/owner of the app you don't need to heed it, you should already be able to grant yourself permissions to use it.

Get user OpenID URL without user interaction

I have an packaged app in the Chrome Web Store that I'd like to transition from a paid app to a free one with in app purchases. I need to be able to detect if the current user had paid for the app previously.
To be able to use the licensing API, I need the current user's OpenID URL. I was able to get this to work using chrome.identity and a popup dialog that the user has to authorize. But it is a bad experience and kind of a scary dialog.
For hosted apps, it's possible to get the user's OpenID URL without any user interaction or authorization. (see How to skip the OpenID approval screen). It would be fantastic if somebody knows how to make this work without user interaction for packaged apps.
I've detailed some of the approaches I've tried on this chromium-apps thread. I suspect it may be possible to do this with chrome.identity.launchWebAuthFlow but I wasn't able to discover the exact incantation of parameters to google's oauth/openid endpoints to make this happen silently.
I think you need to refer to this Link1 Parameters
this parameters are different techniques using that you can do this task..
also To bypass the Login/approval screen refer this link2
Here in the section How to skip the OpenID approval screen the details are explained which you can use..
And In case of packaged app this should ask for permanent permission that will help in OAuth throughout the life of app..
Client Library JavaScript Based
Authentication using Library
After your comment I thought this you can bind in your app.!!
Let me know what works for you..