테스트 사이트 - 개발 중인 베타 버전입니다

FaceBook 사진 올리면서 태그 같이 넣기

· 11년 전 · 1807
publish_stream 권한 필요.
<%=access_token%>는 미리 가져온 토큰.
target_id:to_id를 주석 해제하면 내 앨범이 아니라 친구 앨범에 추가됨. (동의 없이) - 1회만 해 본 거라 정확하지 않음
$는 제이쿼리
    function postToFeed(to_id,to_name,imgURL,message){
      $('#wait_div').html('담벼락에 게시하고 있습니다.').show()
    // 자기 담벼락에 사진 올리기 - 자동 (동의 절차 없음)
    FB.api('/photos','post',{
        message:$('#name').val()+'님이 '+to_name+'님에게 All New Style 2013 Spark를 타고 영화를 보러 가길 초대합니다.\n\n'+message,
        //target_id:to_id,  //친구에게 사진 올리기 (동의 절차 없음)
        uid:$('#id').val(),
        access_token:'<%=access_token%>',
        tags:[{
          tag_uid:to_id,
          x:20,
          y:40
        }],
        url:imgURL
      },
      function(response){
        if(!response || response.error){
          $('#wait_div').html('Error occured:'+response.error.message)
        } else {
          $('#wait_div').html('담벼락에 게시하였습니다.').show()
          $('#wait_div').html($('#wait_div').html()+'<br>Photo Post ID:'+response.id)
          $('#process_2').hide()
          if(auto_commit){
            $('#mobile').attr('class','')
            $('#form').submit()
            $('#process_4').show()
          }
          else{
            $('#process_3').show()
          }
        }
      }
    )
}

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
11208
11205
11202
11198
11197
17717
11194
11192
11190
17708
20659
20653
17702
17693
11186
20649
11184
11179
11177
11176
20648
20643
20639
11175
11167