2013-08-16 3 views
2

다음 코드를 사용하여 Android 앱에서 google plus의 게시물을 공유했습니다. 하지만 설명의 설명을 보여주지는 않습니다. 설명을 제외한 모든 것을 보여줍니다. 이것에 대한 이유가 있습니까?스 니펫 설명이 Google 플러스 포스트 (Android)에 표시되지 않습니다.

Intent shareIntent = new PlusShare.Builder(this) 
      .setText("Test") 
      .setType("text/plain") 
      .setContentDeepLinkId(
        "Example", /** Deep-link identifier */ 
        "Snippet", /** Snippet title */ 

    // ------------ Below Desciption is not visible in post -------------- 

        "Good Example", /** Snippet description */ 

        Uri.parse("https://www.example.com/snippet.png")) 
      .getIntent(); 
    startActivityForResult(shareIntent, POST_ON_GOOGLE_PLUS); 

도움을 주실 수 있습니다.

답변

1

Google APIs Console에서 딥 링크를 사용하도록 설정했는지 확인한 후 Client ID for installed applications인지 확인하십시오.

이이 안드로이드 클라이언트를 사용할 경우, 시도 및 설명서에서 샘플 코드가 작동하는지 확인, 난 그냥 그것을 테스트하고 나를 위해 작동합니다

PlusShare.Builder builder = new PlusShare.Builder(this, mPlusClient) 
    .setText("Lemon Cheesecake recipe") 
    .setType("text/plain") 
    .setContentDeepLinkId("/cheesecake/lemon", /** Deep-link identifier */ 
      "Lemon Cheesecake recipe", /** Snippet title */ 
      "A tasty recipe for making lemon cheesecake.", /** Snippet description */ 
      Uri.parse("http://example.com/static/lemon_cheesecake.png")) 
    .getIntent(); 

뭔가 참고 :

  • PlusShare.Builder(this)은 승인되지 않은 클라이언트를 사용하며 일반 공유로 대체됩니다. 동작 버튼

I에 대한 호출을 설정 조각

  • 지정

    • 미리 입력받는
    • : 클라이언트를 통과하지 않을 경우

    다음이 작동하지 않습니다 이것이 대화식 게시물이 올바르게 렌더링되지 않는 이유입니다. 승인 된 API 클라이언트를 전달해야합니다.

  • +0

    예, Google 플러스 API 콘솔에서 활성화되어 있습니다.이 코드로 시도 할 때 변경된 사항은 PlusShare 대신 PlusShare.Builder builder = new PlusShare.Builder (this)입니다. 빌더 빌더 = 새로운 PlusShare.Builder (this, mPlusClient). 그럼이 둘 사이에는 어떤 차이가 있습니까? – Ponting

    +0

    모르겠다. 내가 알아낼 수있는 것을 볼 것이다. – class

    +0

    Ok. 솔루션을 제안 할 때 알려주세요. – Ponting