HIVE Social request

 

목차

용어 설명

소셜 서비스

Facebook, Google와 같은 외부 소셜 네트워크 서비스를 의미합니다.

Format

int CS_hubSocialRequest(
    const char *socialService,
    const char *requestName,
    const char *params,
    HubCallbackWithJSON responseCallback,
    void *callbackParam
);

social Request ApI 사용에 대한 자세한 내용은 CS hubSocialRequest을 참고 바랍니다.

 

social/request_user_profile

Request Params

Response JSON

성공 실패
{
        "service": "facebook",
        "type": "social/request_user_profile",
        "uid": "100004610070924",
        "email": "crimson.lake.210@gmail.com",
        "gender": "F",
        "country": "KR",
        "language": "ko",
        "username": "crimson.lake.5",
        "screen_name": "Crimson Lake",
        "second_email": "crimson.lake.5@facebook.com",
        "bio": null,
        "error_code": 0
}
{
        "service": "facebook",
        "type": "social/request_user_profile",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
uid
유저의 AppScoped ID

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/invite_dialog

Request Params

주의! request parameter가 반드시 존재해야 합니다.

{
    "message": "hive로 초대합니다."
}

message
invite_dialog 성공 후 초대 알림에 들어가는 메세지
초대 메세지는 기획에 따라 게임 내에서 default로 설정하거나, 유저가 입력할 수 있도록 할 수 있습니다.

Response JSON

성공 실패
{
        "service": "facebook",
        "type": "social/invite_dialog",
        "error_code": 0,
        "receivers": [uids ...]
}
{
        "service": "facebook",
        "type": "social/invite_dialog",
        "error_code": 2004,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
error_code
하단 errors 참고
receivers
성공시에만 리턴, 초대 메세지를 보낸 유저 uid 배열
error_msg
실패시에만 리턴, 에러 메세지

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러
2004 사용자 취소 / facebook 서비스 에러

 

 

social/received_invite

Request Params

{
  "limit" : 10
}

limit
받을 초대 목록 수 limit=1의 경우 마지막으로 초대한 유저 정보만 받음
default : 1
Max : facebook에서 지정한 max 값 (정해진 값 없음)

Response JSON

성공 실패
{
        "service": "facebook",
        "type": "social/received_invite",
        "data":[{
                "application": {
                        "name": "서머너즈 워: 천공의 아레나",
                        "id": "1493038024241481"},
                "created_time": "2015-04-07T04:38:44+0000",
                "from": {
                        "id":"294738630709084",
                        "name": "Mc RoandOne"   },
                "message": "Invite YOU!",
                "to": {
                        "id": "282789145237249",
                        "name": "Ronald Mc"},
                "id": "726840560765725_282789145237249"}
                ......
        ]
        "error_code": 0
}
{
        "service": "facebook",
        "type": "social/received_invite",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
data
결과 내용 배열

application
초대 받은 Application 정보, id는 어플리케이션 FB Key
created_time
초대 보낸 시각GMT기준 “yyyy-MM-dd'T'HH:mm:ss+0000”
from
보낸 사람 (초대 보낸 친구의 정보) - 중복 가능, id는 친구의 FB Appscoped ID
message
초대 메시지 내용
to
받는 사람 (현재 유저 자신의 정보) , id는 나의 FB Appscoped ID
id
FB Message ID

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/request_friends

Request Params

Response JSON

성공 실패
{
  "service" : "facebook",
  "type" : "social/request_friends",
  "error_code": 0,
  "friends":["104982930183913","1419727771872993"]
}
{
        "service": "facebook",
        "type": "social/request_friends",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
friends
친구의 FB Appscoped ID 목록

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/user_profile_image

Request Params

주의! request parameter가 반드시 존재해야 합니다.

{
  "user_id" : "1020399418"
}

user_id
유저의 AppScoped ID

Response JSON

성공 실패
{
  "service" : "facebook",
  "type" : "social/user_profile_image",
  "url" : "https://fbcdn-profile-a.akamaihd.net/hprofi..."
  "error_code": 0,
}
{
        "service": "facebook",
        "type": "social/user_profile_image",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
url
url형태의 profile image

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/share_app_activity

Request Params

주의! request parameter가 반드시 존재해야 합니다.
주의! 페이스북 정책에 의해 2017년 7월 18일부터 "name", "description", "picture"에 해당하는 매개변수는 API 호출 시 더 이상 작동하지 않습니다. (link 데이터만 동작)

{
    // 매개변수 "name", "description", "picture"는 더 이상 작동하지 않습니다.
    // "name": "보물 발견!",
    // "description": "이건 다이아몬드 아니냐!",
    // "picture": "http://dicimg.naver.com/endic/en_thumb/sourcing_images/0/563_cobis_20070206153322.jpg",
    "link": "http://m.com2us.com"
}

name
게시글의 제목
description
입력 선택 가능. 미 입력 시 앱 스토어에 있는 게임 소개 내용이 표시 됨
picture
입력 선택 가능. 미 입력 시 앱 아이콘이 표시 됨
link
필수 입력. 데스크톱에서 해당 포스팅을 클릭할 경우 이동하는 링크

Response JSON

성공 실패
{
  "service" : "facebook",
  "type" : "social/share_app_activity",
  "result": true or false (when user cancel),
  "error_code": 0
}
{
        "service": "facebook",
        "type": "social/share_app_activity",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
result
true or false (when user cancel)

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러
2004 사용자 취소

 

 

social/is_authorized

Request Params

Response JSON

성공 실패
{
        "service": "facebook",
        "type": "social/is_authorized"
        "error_code": 0,
        "is_authorized": 0
}
{
        "service": "facebook",
        "type": "social/is_authorized",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
error_code
하단 errors 참고
is_authorized
0 - 인증 안됨(session closed), 1 - 인증 됨(session opened)

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/logout (Deprecated, C2S.19.6)

Request Params

Response JSON

성공 실패
{
        "service": "facebook",
        "type": "social/is_authorized"
        "error_code": 0,
        "result": 0
}
{
        "service": "facebook",
        "type": "social/is_authorized",
        "error_code": 2003,
        "error_msg": "{error_message}"
}

service
지원 소셜 서비스 명
type
호출 social request
error_code
하단 errors 참고
result
성공 여부, 0 - 실패, 1 - 성공

Errors

error code 설명
0 성공
2003 외부 소셜 서비스 에러

 

 

social/connect

Request Params

Response JSON

성공 실패
{
        "type": "social/connect",
        "error_code": 0
        "service" : "googleplus"
}
{
        "type": "social/connect",
        "error_code": 1701,
        "error_msg": "{error_message}"
        "service" : "googleplus"
}

service
지원 소셜 서비스 명
type
호출 social request
error_code
하단 errors 참고
error_msg
실패시에만 리턴, 에러 메세지

Errors

error code 설명
0 성공
1300 정식 로그인 세션 정보 없음(게스트 상태 등)
1701 현재 HIVE 계정에 연동된 SNS와 동일
1702 현재 HIVE 계정에 이미 다른 SNS 계정이 연동된 상태
1703 현재 SNS 계정이 다른 HIVE 계정에 연동 상태
2000 타임 아웃 or 기타에러
2001 Facebook 사용자 취소
2002 요청 실패
2004 PGS서비스 에러, 업데이트 필요, 서비스 불가

 

 

social/set_permission

Request Params

Response JSON

성공 실패 (비어있거나 nil인 경우)
{
        "service" : "facebook"
        "type" : "social/set_permission" ,
        "error_code" : 0
}
{
        "service" : "facebook"
        "type" : "social/set_permission" ,
        "error_code" : -9 ,
        "error_msg" : "{error_message}"
}

Errors

error code 설명
0 성공
-9 Invalid Param