Got origin_mismatch error in Google+ share api

后端 未结 16 822
醉梦人生
醉梦人生 2020-12-03 07:04

I want to share some dynamic content on google+. For this I checked it https://developers.google.com/+/web/share/interactive#rendering_the_button_with_javascript

<         


        
相关标签:
16条回答
  • 2020-12-03 07:49

    It worked for me by removing "www." from google console. I simply used http://example.com and it worked ...

    0 讨论(0)
  • 2020-12-03 07:49

    For VS users:
    Open Properties of your project and get Project URL:

    enter image description here
    This is your Javascript Origins

    Change also the Redirect URIs. It should be your origins + "/oauth2callback"
    For me:

    enter image description here

    0 讨论(0)
  • 2020-12-03 07:50

    I fixed it by change JavaScript origins and redirect URIs in google console from http://0.0.0.0:4567 to http://localhost:4567, remember adding /oauth2callback after redirect URIs and change url on browser to http://localhost:4567

    0 讨论(0)
  • 2020-12-03 07:51

    The most common oversight resulting in this error is forgetting to add both HTTP and HTTPS origins on the consent settings in the App Credentials dashboard.

    To fix, go to https://console.cloud.google.com/apis/credentials?project=YOUR-APP-ID

    Select the OAuth 2.0 client IDs if you had already created one.If not, you will have to create a new client ID for your origin.

    Under Authorised JavaScript origins, add both https and http origins for you app if had not added both.

    0 讨论(0)
提交回复
热议问题