Integrate Facebook Payments with Facebook Ads API - facebook-ads-api

I am creating an web app that enables users to create facebook ads. The problem is that every ad needs a budget. So I need the user to be able to set a budget and pay for it using his credit card or phone or anything else. Is it possible to do this? Do you have an example or tutorial? I have searched on google but I didn't find anything useful.

In short, no. Payment method setup isn't exposed via FB APIs. Furthermore, it depends on whether these users are using their own FB ad account through your platform or whether they're using yours.
If it's under your own ad account then you'll need to build account and payment controls yourself which is outside the scope of the FB ads platform and API.
If you let users enter their own ad account information and authorize your app to create ads on their behalf then you could just have them manually set FB payment method information as part of the onboard process for your web app.

Related

Google API Authentication for App That Only Accesses One Account

Should I use a Service Account or an OAuth 2.0 Client ID?
I'm struggling to understand Google's documentation on authenticating for their APIs. I'm creating a basic application that will help users add and modify Google Calendar events for a single Google account (the account is shared between all users). I only need the application to access that one account, it'll never need to access any others.
It seems to me that Service Account would be best for this, but Google's documentation suggests Service Accounts should only be used for automated processes (unless I'm misunderstanding). For instance this page contains the following, describing when to use Service Accounts.
Would my application qualify as acting on the users behalf?
If so, I would want to use OAuth Client ID credentials, which will ask the user to sign in to a google account. In this case, is there a way I can guarantee they only sign in to the one account I want modified?
I can't find any decent documentation on the OAuth authentication requests to figure this out myself. If there is any could you point me there?
I'm sure I'm misunderstanding something basic here, but thank you for any help!
First off you should know that you can only use service accounts with Google aclendar api if you have a google workspace domain account.
You can then set up a calendar and a domain user that the service account can act on behalf of to control the access of that calendar.
Assuming that your application is going to preform all actions on this calendar then yes i would say that you could use a service account for this. If your app bacly has a ui with a calendar on it your just using google calendar to store the data.
However if you intend to share this calendar with the users themselves, this way they could see it within their own google Calendar account. Im not sure a service account would be the way to go.
If you want the users to be able to see it and make changes then you may want to just use Oauth2. Grant them access to the calendar and then request access to their calendar account.
Drawback to that option is going to be the verification process. You will get access to all the users calendars and your going to need write access.
If you can go with a service account you really should consider it it will save you a lot of hassle with verification.

Google Sign-in identify account tied to a school

I'm using Google Sign-in to register and login users to my web app.
We are an edtech product, so I would like to make sure users are registering with a google account that is tied to a school and not using their personal google accounts.
Is this possible?
I don't see a field in user that would indicate this. I also can't find confirmation as to whether or not school google accounts can have an #gmail.com email or if they must use a custom domain.
Note that these account may or may not be using Google Classroom, so I can't rely on that.
Unless you have a List of the "school" accounts and can test against that there is no way for you to know.
Google is not going to tell you if its a school google account. They may know if its a google classroom account but that kind of information is not shared at login time. Probably due to user privacy.

Marketplace - Are apps tied to a specific google account?

We are currently attempting to publish an App on the Google Marketplace (aka Chrome Web Store).
My boss has paid the $5 developer fee using his Gsuite account, and when I log in to publish the app, it keeps requesting the $5 fee to be paid. We are both part of the same GSuite domain (rulerr.com). I'm guessing this means the payment is tied to his account specifically? Is there any way to get this tied to our Gsuite domain?
As a result of the way this works, if I end up publishing using my account can anyone delegated from my domain modify it? If I was to go on vacation/sick leave/move on to another company then noone in my organization would be able to modify the App details?
Would adding a shared mailbox account specifically for marketplace registration alleviate this issue?
Laurie,
You can create a Google Group and use that as the owner of your app.
https://developer.chrome.com/webstore/publish#set-up-group-publishing
Any member of that group will then be able to publish. (when they have paid the 5$ fee)

How to manage a user session using Azure Mobile Services?

I'm building mobile applications using .NET. What I'm looking for is a way to manage user sessions and info using Azure Mobile Services. I've read a lot about the authentication in Azure Mobile Services, but this only authenticates a user via Facebook, Twitter, etc ... to access azure services.
I'm looking for user session management, i.e. register, login, logout. Be able to save and retrieve user info, i.e., save certain info against the user such as age for example. Also session management and caching, i.e. the user will remain logged on when the app is closed and re-opened. Also azure mobile services doesn't seem to provide a way to allow me to register users via email.
Basically, If anyone is familiar with Parse, I'm looking for having similar functionality in Azure. Can anyone help please ?
Thanks
Out of the box, Mobile Services provides easy authentication with social providers (Facebook, Twitter, etc) and Azure Active Directory. If you want to do registration via email, you'll have to create a custom auth system. This is going to be more complex than just flipping a switch and using Facebook auth, but totally doable and I can point you in the right direction. First, check out this post that will explain how you can create a registration / login system using custom API and the script backend. If you're using a .NET backend, you'll need to alter thing a bit (the samples are in JS) but it should be pretty easy to convert. The only piece that is really missing from that post is how to do email verification. To do this with Mobile Services, I would suggest the following.
Sign up for a SendGrid account (free in the Azure store)
From your script, after registering the user, generate a random alphanumeric string that is saved to their account / user record in the table.
Use the same string to create a URL which you can send to the user's email address (check out this tutorial for sending email via SendGrid and Mobile Services).
The link can either go to a different custom API or a web front end. When that endpoint is hit, it should update the user record to show that they have verified their email address.

APP Inventor get current user functionality

I know on the Google App engine there is support for Google Accounts via user = users.get_current_user() functionality. I have used this and then I request the user to create account on my app. Is there anyway for the phone app to gain assess to the the user = users.get_current_user() functionality?
I have seen the example of creating a register / login on AI and storing it on TinyDB but the Google UserID is already available on the app engine. How do I access this functionality on the phone app?
with OAuth you can ask the user for permission to view his email address and read that information from his Google profile, see an example how to do that with App Inventor here http://puravidaapps.com/taifunOA.php
No, this feature does not exist. It has been proposed and can be voted for here.

Resources