• Send message on google+ from your web page

    Create a Google APIs Console project and generate a client ID on the API Access pane.Create a client ID for each of the platforms that you plan to support within the same project. The Google+ app automatically routes a click on a deep link to the app for the correct platform using this information.

    1
    
    Include the following JavaScript just before your tag:<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>Choose a label for your call-to-action button from the following list of values: ACCEPT ACCEPT_GIFT ADD ADD_FRIEND ADD_ME ADD_TO_CALENDAR ADD_TO_CART ADD_TO_FAVORITES ADD_TO_QUEUE ADD_TO_WISH_LIST ANSWER ANSWER_QUIZ APPLY ASK ATTACK BEAT BID BOOK BOOKMARK BROWSE BUY CAPTURE CHALLENGE CHANGE CHAT CHECKIN COLLECT COMMENT COMPARE COMPLAIN CONFIRM CONNECT CONTRIBUTE COOK CREATE DEFEND DINE DISCOVER DISCUSS DONATE DOWNLOAD EARN EAT EXPLAIN FIND FIND_A_TABLE FOLLOW GET GIFT GIVE GO HELP IDENTIFY INSTALL INSTALL_APP INTRODUCE INVITE JOIN JOIN_ME LEARN LEARN_MORE LISTEN MAKE MATCH MESSAGE OPEN OPEN_APP OWN PAY PIN PIN_IT PLAN PLAY PURCHASE RATE READ READ_MORE RECOMMEND RECORD REDEEM REGISTER REPLY RESERVE REVIEW RSVP SAVE SAVE_OFFER SEE_DEMO SELL SEND SIGN_IN SIGN_UP START STOP SUBSCRIBE TAKE_QUIZ TAKE_TEST TRY_IT UPVOTE USE VIEW VIEW_ITEM VIEW_MENU VIEW_PROFILE VISIT VOTE WANT WANT_TO_SEE WANT_TO_SEE_IT WATCH WATCH_TRAILER WISH WRITE View same list with translations and descriptions. The values from this list are used by Google+ to localize the button to the user's language. This value is used in your data-calltoactionlabel parameter. You can create an interactive post button on your page by using the JavaScript API. You use the gapi.interactivepost.render() method to transform an element to be an interactive post button. For example, the following code creates a interactive post from the element with the ID of sharePost:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    
    <script type="text/javascript">// <![CDATA[
      var options = {
     
        contenturl: 'https://plus.google.com/pages/', // Your content url
     
        contentdeeplinkid: '/pages',
     
        clientid: 'xxxx.apps.googleusercontent.com',//  Your client id
     
        cookiepolicy: 'single_host_origin',
     
        prefilltext: 'Create your Google+ Page too!',
     
        calltoactionlabel: 'INVITE',
     
        calltoactionurl: ''https://plus.google.com/pages/',
     
        calltoactiondeeplinkid: '/pages/create'
     
      };
      // Call the render method when appropriate within your app to display
      // the button.
      gapi.interactivepost.render('sharePost', options);
    // ]]></script>Make sure your content url and calltoaction url must be same
    Tags:

Comments on this post

Leave a Reply

  • Security Code :


    4 + seven =