Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public class linkedinauth {
  2. public String x{get;set;}
  3. public static final string REDIRECT_URL='https://test.salesforce.com/services/authcallback/*****000000Ua7EAE/LinkedIn';
  4. public static final string LINKEDIN_API_KEY='******ahx9s8jg';
  5. public static final string OAUTH_CODE_END_POINT_URL='https://www.linkedin.com/uas/oauth2/authorization?response_type=code';
  6. public static final string SCOPE='r_basicprofile';
  7. public static final string STATE='75etfdcdgsdvvsdgd';
  8.  
  9. public PageReference connect(){
  10. x=OAUTH_CODE_END_POINT_URL+'&client_id='+LINKEDIN_API_KEY+'&scope='+SCOPE+'&state='+EncodingUtil.urlEncode(STATE,'UTF-8')+'&redirect_uri='+EncodingUtil.urlEncode(REDIRECT_URL,'UTF-8');
  11. PageReference pageRef = new PageReference(x);
  12. return pageRef;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement