Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class linkedinauth {
- public String x{get;set;}
- public static final string REDIRECT_URL='https://test.salesforce.com/services/authcallback/*****000000Ua7EAE/LinkedIn';
- public static final string LINKEDIN_API_KEY='******ahx9s8jg';
- public static final string OAUTH_CODE_END_POINT_URL='https://www.linkedin.com/uas/oauth2/authorization?response_type=code';
- public static final string SCOPE='r_basicprofile';
- public static final string STATE='75etfdcdgsdvvsdgd';
- public PageReference connect(){
- 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');
- PageReference pageRef = new PageReference(x);
- return pageRef;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement