Guest User

Untitled

a guest
Feb 19th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. LocalSocial ls = LocalSocialFactory.getLocalSocial();
  2. AccessToken token;
  3. try {
  4. token = ls.getAccessToken();
  5. String path = new StringBuffer(Server.API_VERSION_PATH).append("/networks/").append(m_network).toString();
  6. Response response = token.post(path);
  7.  
  8. if (response.getStatus() == 302) {
  9. String location = response.getLocation();
  10. loadWebPage(location);
  11. }
  12. } catch (LocalSocialError lsr) {
  13. lsr.printStackTrace();
  14. } catch (UnauthorizedException e) {
  15. e.printStackTrace();
  16. } catch (IOException e) {
  17. e.printStackTrace();
  18. }
Add Comment
Please, Sign In to add comment