Read/Write Google Sheets API on react-native - react-native

basically I want to use Google Sheets API on my React Native project to write some data there on a single sheet.
Here are the problems I'm facing after searching for hours:
I want to be able to read and write, such as creating new sheets inside the spreadsheet, hence I can't use the public API or an API key.
I don't need the user to login, so I can't use the Google sign in API. More like, I want my developer account to be signed in, as I wanna use my own single spreadsheet for all users. Think of it as using it as a database for my app (don't worry, I'm not).
I found many wrappers but they're all meant for node and don't work on react native.
I'm trying to use the vanilla google APIs, but I'm having trouble getting an "Access Token" as the only way i found to get it was by making a user sign in. I created a Service Account but I can't figure out how to use on react native. The npm module I found doesn't work on react native.
So I guess here is what I'm looking for: either
A wrapper for Google Sheets API that takes care of authentication as well.
How to get an access_token for my developer account, without prompting the user to sign in.
Thanks!

Related

How to add scopes using expo's example on Google Authentication + firebase

I'm creating an app using react native + expo + firebase + google apis.
I'm trying to use certain Google products (lets say, calendar)
I'm trying to grab user's access token from Google
Expo has this document
https://docs.expo.dev/guides/authentication/#google
Unfortunately, their document is not complete, there's no other guides or API documentations. (They don't even document some functions that they are using)
There's no instructions on how to add scopes when following this method.
Has anyone succeeded in attaching a scope and grabbing a valid access token?
Any help would be appreciated, Thanks

How to save data in a salesforce account using react-native?

We are building an Application and we need to store some data to the user's Salesforce account. I looked into some solutions where people are using Apex but I am unable to understand how to use them with React Native.
Please give me some good documentations to refer of How can I save my data from my React Native App to my Salesforce Account.
I tried to look into Apex and visualforce but not understanding how to use it with React Native.
For react Native you will have to call REST API exposed by salesforce. You will need to create a connected app and get the security key and client id. Use them to authenticate and get a access_token. Once you have that token, use it to make a POST call to /services/data/v45.0/sobjects/Account using the account id. Send a JSON payload to add your data.
Example of a GET call is :
/services/data/v45.0/sobjects/Account/0013600000udFs8AAE
Hope this helps!

Login Via Twitter

It has been almost a month and I couldn't figure this out.
I am developing a social network application and I want the users to be able to log in via their Twitter and Facebook account Like the screenshot below:
The Facebook is done, and I am stock with the twitter, Note that these pictures are actually set as a buttons.
What I want exactly is:
The user can be able to login (sign up) on the application using their Twitter and I will retrieve the basic information from Twitter API "Name,Username,Profile picture" in my application and store them in my database.
Note: I am using Parse and I already have a table call user.
Please help me :'(
It sounds like you haven't tried anything with Twitter yet.
If this were my code, I'd probably use the Twitter API to login, which they introduce you to here.
Or you can use one of the handy Objective-C libraries they've listed here

Google Tasks API authorization

I can see many related questions on SO, but none that answers exactly what I'm confused with.
I'm using Google Calendar API in a .NET desktop application that allows user to provide his/her username/password, logs in on his behalf and adds some events to the calendar. Now I want to do exactly the same thing for Tasks feature. I'm trying to use Google Tasks API for this, but have been told that I need to do some OAuth kind of authentication, and even before that, I need to go to my gmail account and set permissions and get my project "key" to enable it.
Now does every user of my application need to do these steps in their Gmail account? Or do I need to do this in MY gmail account once and then my application code will be able to use the generated project "key" to enable my users to add tasks to THEIR gmail tasks list?
Figured it out. For anyone having a hard time understanding this, here it is:
The "key" generation step needs to be done only once per application, not for each user who's going to use your application. To generate a key, login to your Google Account and go to Google APIs Console page. Click API Access button and that's where you can generate keys for different kinds of applications like browser apps, desktop apps, Android apps etc. After registration, you'll need to take Client ID, Client secret and API key from this page and put them into the code. Sample code (.NET) for task creation and several other Google features is available here.
Once your user runs your application, he'll be taken to his Google account in his default browser where he'll be asked if he wants to allow this application to write to his calendar/tasks list. This page will display your logo and description text too that you can provide at registration time. Once allowed, this step won't be required again in the next one hour (this may be adjustable, i don't know yet).

How to Integrate Google+ API iPhone

I am working on an iPhone application in which i have to implement Google+ API for login and fetching user details.I have used the API for it from this link https://developers.google.com done everything but immediately after login I am getting an error invalid scope.I don't know what i am missing out.Please let me know how to acheive this.
Thank you.
To access certain stuff on behalf of the user, we need to tell google that we are looking for such information (Access calendars, google+ etc).
The way to tell this to google is by defining scope. For google plus use
#"https://www.googleapis.com/auth/plus.me"
Refer to the SDK where to pass in the scope. Also make sure that you enable Google Plus in the Google API Console.