function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ranjithsabranjithsab 

Integrating salesforce and Google plus. posting the message from salesforce to google plus.

Please tell me the Endpoint url to post in GooglePlus.

                HttpRequest httpReqm = new HttpRequest();
                httpReqm.setMethod('POST');
               String EndPointURL1 = 'https://www.googleapis.com/auth/plus.me';
               httpReqm.SetEndpoint(EndPointURL1);
               String AuthHead = tokenType + ' '+AccessToken ;
               httpReqm.setHeader('Authorization',AuthHead);
               httpReqm.setHeader('Content-Type','application/json');

               HttpResponse httpResm = new HttpResponse();


Integrating salesforce and Google plusI am trying to post the message from salesforce to google plus.


ERROR:

 

  Status=HTTP method POST is not supported by this URL, StatusCode=405.

 

Thanks In Advance,

 

Ranjith

Vinita_SFDCVinita_SFDC

Hi,

Set endpoint as follows:

req.setEndpoint(URL.getSalesforceBaseUrl().toExternalForm() + EndPointURL1);

Please refer following links for examples:

http://salesforce.stackexchange.com/questions/4692/screen-scrape-salesforce-with-rest-get-call-from-apex

http://salesforce.stackexchange.com/questions/13282/updating-multi-currency-rates-from-apex