Got origin_mismatch error in Google+ share api

后端 未结 16 1010
醉梦人生
醉梦人生 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条回答
  •  猫巷女王i
    2020-12-03 07:30

    Origin mismatch is normally caused by the Javascript origins not being set correctly in the API project console. You need to make sure that the Javascript origins match the domain from which your requests are coming and to which you are returning the user after sign in.

    More details can be found in the developer documentation in the "Create a client ID and client secret" section.

    Note: A common mistake here is to add javascript origins for http:// but not https:// (or vice versa). If you want to allow users to access your site from both then you need to list both in the javascript console.

    Note (Thanks Bethel Goka): You must include the port number of your server in the javascript origins if a port number appears in the url when users access your site.

提交回复
热议问题