컴

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

· 2013-11-23 (토) 11:03:24 · 4026
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()
          }
        }
      }
    )
}
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-03-02 조회 3,260
16-01-19 조회 2,548
15-12-23 조회 2,975
15-12-08 조회 3,696
14-10-30 조회 5,747
14-06-06 조회 5,570
12-08-30 조회 3,930
12-08-20 조회 3,850
12-07-15 조회 5,177
12-07-13 조회 3,642
12-07-06 조회 3,874
12-06-27 조회 3,383
12-06-23 조회 3,600
12-05-03 조회 5,205
12-04-20 조회 4,137
12-03-29 조회 4,654
12-03-22 조회 4,762
12-03-22 조회 3,533
12-03-21 조회 3,306
12-03-11 조회 3,727
12-03-06 조회 4,279
12-02-22 조회 4,550
12-02-17 조회 3,351
12-02-17 조회 6,204
12-02-14 조회 6,151
12-02-06 조회 4,279
12-01-18 조회 3,232
12-01-06 조회 3,455
11-12-30 조회 3,931
11-12-30 조회 7,078
11-12-21 조회 3,299
11-12-21 조회 4,265
11-12-16 조회 3,295
11-12-15 조회 3,329
11-12-15 조회 3,443
11-12-15 조회 4,244
11-12-09 조회 3,248
11-12-09 조회 3,320
11-12-07 조회 2,884
11-12-07 조회 3,973
11-12-05 조회 4,423
11-12-02 조회 3,882
11-12-01 조회 2,752
11-12-01 조회 2,802
11-12-01 조회 2,783