3
Google+의 Android 애플리케이션에서 URL을 게시하려고합니다. 이 URL은 OgTags이지만 콘텐츠, 제목, 이미지 또는 설명을 가져올 수 없습니다.Android 애플리케이션의 Google+ 용 그래프 태그 열기
누구나 수리를위한 아이디어가 있습니까? 여기
는 URL의 코드입니다 :<!DOCTYPE html>
<html lang="fr-FR" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="robots" content="noindex,follow"/>
<meta property="og:locale" content="fr_FR" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Test Title" />
<meta property="og:description" content="Test description" />
<meta property="og:url" content="http://www.test.com/test" />
<meta property="og:site_name" content="Test name" />
<meta property="article:published_time" content="2013-11-29T17:09:55+00:00" />
<meta property="article:modified_time" content="2014-05-21T10:05:55+00:00" />
<meta property="og:updated_time" content="2014-05-21T10:05:55+00:00" />
<meta property="og:image" content="test_content.png" />
그리고 여기에 요청 builing의 코드를 다음과 같습니다
public GooglePlusHelper(Activity context) {
mActivity = context;
mPlusClient = new PlusClient.Builder(mActivity, this, this)
.setActions("http://schemas.google.com/AddActivity", "http://schemas.google.com/ReviewActivity")
.setScopes("PLUS_LOGIN") // Space separated list of scopes
.build();
}
public void connect() {
mPlusClient.connect();
}
public void disconnect() {
mPlusClient.disconnect();
}
/**
* Open Google+ to share a link
*
* @param message
* @param link
*/
public void shareUrl(String message, String link) {
if (!Tools.hasNetworkConnection(mActivity)) {
AlertHelper.displayInternetRequired(mActivity);
return;
}
Intent shareIntent = new PlusShare.Builder(mActivity)
.setType("text/plain")
.setText(message)
.getIntent();
if (mActivity.getPackageManager().queryIntentActivities(shareIntent, PackageManager.MATCH_DEFAULT_ONLY).size() > 0) {
mActivity.startActivityForResult(shareIntent, SHARE_REQUEST);
} else {
AlertHelper.displayGooglePlusRequired(mActivity, new Runnable() {
@Override
public void run() {
mActivity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(mActivity.getString(R.string.uri_app_market) + "com.google.android.apps.plus")));
}
});
}
}
을 그리고 나는 이것을 호출
mGooglePlusHelper.shareUrl("Go share it !", "http://www.test.com/test");
감사