online job

Friday 4 April 2014

Handling Large Course Objects

Handling Large Course Objects

If a fitness:metrics contains too many ActivityDataPoints, an object's URL may take too long to load. In these circumstances, please use pointers and move all of the ActivityDataPoints to the destination URL.
A source URL example:
<head>
  <!-- Standard Open Graph object properties -->
  <meta property="fb:app_id"      content="YOUR_APP_ID" />
  <meta property="og:type"        content="some.type" />
  <meta property="og:url"         content="SOME_URL" />
  <meta property="og:title"       content="Some title" />
  <meta property="og:description" content="Some description" />
  <meta property="og:image"       content="SOME_IMAGE_URL" />

  <!-- Other Open Graph properties -->

  <!-- Pointer to ActivityDataPoint destination URL -->
  <link rel="opengraph" href="DESTINATION_URL_FOR_ACTIVITYDATAPOINTS" />
</head>
A destination URL example:
<!-- Special type for an Open Graph metadata object -->
<meta property="og:type" content="metadata" />

<!-- Pointer to the source URL -->
<link rel="origin" href="SOURCE_URL" />

<!-- First ActivityDataPoint -->
<meta property="fitness:metrics:location:latitude"  content="37.416382" />
<meta property="fitness:metrics:location:longitude" content="-122.152659" />
<meta property="fitness:metrics:location:altitude"  content="42" />
<meta property="fitness:metrics:timestamp" content="2011-01-26T00:00" />
<meta property="fitness:metrics:distance:value" content="0" />
<meta property="fitness:metrics:distance:units" content="mi" />
<meta property="fitness:metrics:pace:value" content="0" />
<meta property="fitness:metrics:pace:units" content="s/m" />
<meta property="fitness:metrics:calories" content="0" />
<meta property="fitness:metrics:custom_quantity:value" content="0" />
<meta property="fitness:metrics:custom_quantity:units" content="SOME_UNIT_URL" />

<!-- Second ActivityDataPoint -->
<meta property="fitness:metrics:location:latitude"  content="37.442564" />
<meta property="fitness:metrics:location:longitude" content="-122.164879" />
<meta property="fitness:metrics:location:altitude"  content="50" />
<meta property="fitness:metrics:timestamp" content="2011-01-26T01:00" />
<meta property="fitness:metrics:distance:value" content="2.3" />
<meta property="fitness:metrics:distance:units" content="mi" />
<meta property="fitness:metrics:pace:value" content="0.5" />
<meta property="fitness:metrics:pace:units" content="s/m" />
<meta property="fitness:metrics:calories" content="326" />
<meta property="fitness:metrics:custom_quantity:value" content="486" />
<meta property="fitness:metrics:custom_quantity:units" content="SOME_UNIT_URL" />

Units

The unit common object type enables developers to define a fitness unit of measure (e.g. NikeFuel) which can be referenced by Fitness common objects.
For example:
<head>
  <!-- Standard Open Graph object properties -->
  <meta property="fb:app_id"      content="SOME_APP_ID" />
  <meta property="og:type"        content="fitness.unit" />
  <meta property="og:url"         content="SOME_URL" />
  <meta property="og:title"       content="Some unit title" />
  <meta property="og:description" content="Some unit description" />
  <meta property="og:image"       content="SOME_UNIT_IMAGE_URL" />

  <!-- Developer defined fitness unit name -->
  <meta property="fitness:name" content="Fuel"/>
</head>

Submission Criteria

When submitting these actions, please remember to keep in mind the following:
  • Custom run, walk, or bike actions are no longer accepted. Please use the common actions.
  • Your object should include pace, geo-points, distance, and as many appropriate metrics available to produce the richest possible feed story.
  • Your app must be categorized under the Health & Fitness category. Learn how to edit your app details here.
  • You should set some checks to make sure that your user data remains within a normal range. For example, you do not want users to be able to post a story that they ran 10,000 miles in a single run.
  • Make sure to set or update an end_time or expires_in action property for your actions. More details here.
  • Use Explicit Sharing when a user wants to share their Fitness activity prominently on Facebook.
  • You should not include marketing messages in your object's fitness:live_text, e.g. "Sign up for FunRun America today! Click here!"
Good example
Bad example including marketing messages in the object
Find more information regarding the submission process here

No comments: