Kanin-E / tinder-swipe-automation

My First project: Try to automate tinder swipe using Image classification, Tinder API, and hopefully NLP.
0 stars 1 forks source link

Tinder API #2

Open Kanin-E opened 5 years ago

Kanin-E commented 5 years ago

Hey! @thanakritjutha , I saw in the Tinder API that it's require Facebook token and Facebook id. Is it safe to provide these values to the API?

ghost commented 5 years ago

@Kanin-E Could you point me to the documentation page because I couldn't find it.

ghost commented 5 years ago

First of all when you are working with credentials, the thing that you must not do is that put your hard-coded credential in you source code for example.

# you must not do this
FACEBOOK_TOKEN = "MQi5a?OC*<}J*:3xbmgYrV`7ay]WEo)CpLT;RkR{SF,[tSBaW]Wxu~IpF*-"

tinder.get_image(FACEBOOK_TOKEN) 

Instead, you do these

FACEBOOK_TOKEN = <fill your token>

tinder.get_image(FACEBOOK_TOKEN) 

Or you can use environment variable

import os

FACEBOOK_TOKEN = os.getenv("FACEBOOK_TOKEN")

tinder.get_image(FACEBOOK_TOKEN) 
Kanin-E commented 5 years ago

Hey I don't get the second one. what is < >, can you provide me with keywords to search on google ?

ghost commented 5 years ago

Hey I don't get the second one. what is < >, can you provide me with keywords to search on google ?

I intentionally wrote it wrong to inform others that it will get replaced or it will not work. Nothing is fancy about < >

Kanin-E commented 5 years ago

Although I can call it by echo FACEBOOK_TOKEN in terminal, I can't find it in python using os.environ. What did I do wrong ?

Kanin-E commented 5 years ago
* 1. I think <  >   make the text inside it disappear on GitHub right ?

* 1. I try setting up environment variable by using:
     export FACEBOOK_TOKEN = 'my token'

Although I can call it by echo FACEBOOK_TOKEN in terminal, I can't find it in python using os.environ. What did I do wrong ?

Solved