반응형 페이스북2 Facebook 연동 방법 1. Facebook 에서 App을 만들어 AppId 를 받아와 AccessToken 을 생성한다. 2. AccessToken 을 이용하여 여러가지 정보를 가져올 수 있다. (http://developers.facebook.com/docs/reference/api/user/ )참고. 예를 들어 https://graph.facebook.com/me?fields=id,name 와 같이 Get방시긍로 정보를 가져올 수 있다. 가져오는 정보는 기본적으로 JSON형태의 String으로 오기 때문에 JSON Parser를 이용하여 정보를 가져 와야 한다. (String tempStr = 가져온 정보 JDONArray ja = new JDONArray(tempStr) ja.getString("email") //이메일.. 2011. 10. 13. 트위터, 페이스북에 링크 공유하기 function sendTwitter(sTitle,sUrl){ var shref = "http://twitter.com/home?status="+encodeURIComponent(sTitle)+" "+encodeURIComponent(sUrl); var sWindow = window.open(shref); if(sWindow){ sWindow.focus(); } } function sendFacebook(sTitle,sUrl){ var shref = "http://wwww.facebook.com/share.php?u="+encodeURIComponent(sUrl)+"&t="+encodeURIComponent(sTitle); var sWindow = window.open(shref); if(sWindow).. 2011. 9. 2. 이전 1 다음 반응형