Git Product home page Git Product logo

Comments (12)

skipperbent avatar skipperbent commented on July 18, 2024

Hi razzium.

Please try to run composer update to update the SDK to the latest version (1.1).

This will should fix some of the errors you are experiencing.

Please be aware that the SDK is no longer updated with the latest api-methods from Happn. I'll try to update it, but haven't got the time to do it as of now.

Please let me know if the composer update fixes the errors you are experiencing.

from happn-php-sdk.

razzium avatar razzium commented on July 18, 2024

Hi skipperbent,

Thanks for your answer.

I've updated composer but the errors are still here.
I think it's due to the assertion on the authenticate method.

from happn-php-sdk.

skipperbent avatar skipperbent commented on July 18, 2024

Hi Razzium, i'm sorry to hear that you are still experiencing problems.

It would be much easier to debug if there was tests and an officially supported api :D

Anyways, it's working fine here - I no longer get the application error.

Jing!

Maybe I can reproduce and fix the error if you can provide me with:

  • Which version of PHP are you using?
  • Are you getting the application error when creating a new instance of the Happn class - or when calling a specific method?

from happn-php-sdk.

razzium avatar razzium commented on July 18, 2024

Hi skipperbent,

Haha that's for sure :D

The problem was that the token I entered was not like yours (mine was b966f********86fe9051*****299303).
So I inspect the app with Charles Web Proxy and get a token like yours.

Now it's work when I instanciate the Happn class but I've got no recommendations and when I set a position I've got an "Application error" (not the first time but when i try to update it).

Thanks a lot for your answers.

from happn-php-sdk.

skipperbent avatar skipperbent commented on July 18, 2024

Damn.. that's weird - it's working fine here - also when refreshing.

I'll update it with tests and updated api-methods when i got time.

Nice with the Charles Web Proxy - if you can provide me with some screenshots of the methods/endpoints the Application are calling, it will make it much easier for me to update the SDK with the new functionality, if you need it. :)

Did you use the correct Facebook token? You'll need to follow this link in order to generate a valid token:
https://www.facebook.com/dialog/oauth?client_id=247294518656661&redirect_uri=https://www.happn.fr&scope=basic_info,email,public_profile,user_about_me,user_activities,user_birthday,user_education_history,user_friends,user_interests,user_likes,user_location,user_photos,user_relationship_details&response_type=token

Please read this section of the documentation for further information:
https://github.com/skipperbent/happn-php-sdk#getting-facebook-access-token

Also make sure that you have a valid userId and authToken before calling getRecommendations. I've updated the SDK to throw an exception if no valid authToken or userId was found upon authentication.

Please update the SDK to version 1.2:
https://github.com/skipperbent/happn-php-sdk/releases/tag/1.2

Hope it help..

from happn-php-sdk.

razzium avatar razzium commented on July 18, 2024

It's works, thanks a lot :)

But I cannot update my position, I've got an error and when I get recommandations the distance is always null.

Yeah no problem for screenshots, can I contact you in private (mail) ?

from happn-php-sdk.

skipperbent avatar skipperbent commented on July 18, 2024

Cool - that would help me out alot with creating a new, updated version of the SDK.

Yeah sure, you can find my email on the left side on my profile page:
https://github.com/skipperbent

(wont post it here as it then goes public)

  • Simon

from happn-php-sdk.

springjools avatar springjools commented on July 18, 2024

Hey, did you solve the 403 issue? How? I'm using a python api for happn and also started to receive 403:s starting last week. Worked fine before that. What form does the token have to be in? Has that changed now?

I mean I got a token from that link but I get a 403 error when using it:

https://www.facebook.com/dialog/oauth?client_id=247294518656661&redirect_uri=https://www.happn.fr&scope=basic_info,email,public_profile,user_about_me,user_activities,user_birthday,user_education_history,user_friends,user_interests,user_likes,user_location,user_photos,user_relationship_details&response_type=token

from happn-php-sdk.

skipperbent avatar skipperbent commented on July 18, 2024

Do you recieve the error on every request?

The api has changed alot - but I noticed that changing the platform to Android fixed some of the "Application error".

'platform: android'

There entire list of changes can be found here:
3a076e4

Hope it helps.

from happn-php-sdk.

springjools avatar springjools commented on July 18, 2024

Yes, I receive it on every request from python, but not from curl in the shell. But I found that if I disable SSL certificate validation in python, then it works.

Edit: it was actually the user-agent field that led to the 403 errror. Happn doesn't like "Dalvik/1.6.0 (Linux; U; Android 4.4.2; SCH-I535 Build/KOT49H)"

from happn-php-sdk.

mfld-fr avatar mfld-fr commented on July 18, 2024

Perhaps could we close this issue as no more complain from @razzium and after fixing the problem reported by @springjools ?

from happn-php-sdk.

skipperbent avatar skipperbent commented on July 18, 2024

Good idea 👍 I'll close it right away.

from happn-php-sdk.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.