Google+ 기능이있는 Android 프로젝트에서 작업하고 있습니다. 내가 여기에 기사를 읽고 있어요 : https://developers.google.com/+/mobile/android/app-activitiesGoogle에서 검색 한 활동
내가 코드 아래에 샘플 이해 :
ItemScope target = new ItemScope.Builder()
.setUrl(targetUrl)
.build();
Moment moment = new Moment.Builder()
.setType("http://schemas.google.com/ReviewActivity")
.setTarget(target)
.setResult(result)
.build();
을하지만 아래의 코드를 모르는, setUrl의 목적은 무엇인가?
ItemScope rating = new ItemScope.Builder()
.setType("http://schema.org/Rating")
.setRatingValue("100")
.setBestRating("100")
.setWorstRating("0")
.build();
ItemScope result = new ItemScope.Builder()
.setType("http://schema.org/Review")
.setName("A Humble Review of Widget")
.setUrl("https://developers.google.com/+/web/snippet/examples/review")
.setDescription("It is amazingly effective")
.setReviewRating(rating)
.build();
그리고 링크의 소스 보았다 : https://developers.google.com/+/web/snippet/examples/review합니다. 그것은 이름, reviewRating를 포함 ... 우리가 "SETNAME", "setRatingValue을"필요한 이유 는 ...
<!DOCTYPE html>
<html>
<head>
<title>A Review</title>
</head>
<body itemscope itemtype="http://schema.org/Review">
<section>Name: <div itemprop="name">A Humble Review of Widget</div></section>
<section>
<a itemprop="url" href="https://developers.google.com/+/web/snippet/examples/review">
A link to this review</a>
</section>
<section>
Text:
<p itemprop="text">It is amazingly effective at whatever it is that it is supposed to do.</p>
</section>
<section itemprop="reviewRating" itemscope itemtype="http://schema.org/Review">
<span itemprop="worstRating">0</span> to <span itemprop="bestRating">100</span> rating: <span itemprop="ratingValue">100</span>
</section>
</body>
</html>
감사합니다. 아브라함에게 감사하지만 "setname"에서 이름을 변경하면 Google 앱 활동에서 변경된 사항이없는 것 같습니다. –
다양한 가능성이 있습니다. URL을 포함하면 페이지의 속성이 API를 통해 설정된 속성보다 우선합니다. 'setName'은 아마 name 속성을 지원하는 itemtype에서만 작동 할 것입니다. 이름은 실제로 저장되고 있지만 UI에 표시되지 않을 수도 있습니다. 아마도 액티비티가 API를 통해 표시됩니다. – abraham
예, 알겠습니다. 그리고 어떻게 사용자의 리뷰를 되 찾을 수 있습니까? (평가,...). 다소 혼란 스럽지만 사용자가 Google 검색 결과 페이지에서 평균 리뷰를 보는 방법은 무엇입니까? –