defaultnamehere / tinder-detective

Find your Facebook friends' Tinder profiles. Don't actually use this by the way that's weird. Not even in a good way.
MIT License
701 stars 60 forks source link

Like/Unlike Button links require Auth header. Suggest using AJAX to complete server-side. #44

Open jaungiers opened 7 years ago

jaungiers commented 7 years ago

Simply making /like/userID links on the Like/Unlike buttons produce a 404 error when clicked. This is because sending the web browser down those links with no authentication header doesn't give auth or context on who is sending the like request.

I've improved this function by transforming the buttons into Ajax calls back to the Flask app, which in turn calls the API _get() request to the Like URL, passing with it the authenticated headers and then parsing the response back to the front end (status and match) to indicate success in Liking the profile, and whether that like has resulted in a match.