質問

I've just set up my app for posting a custom graph story, and it's been approved by Facebook, and it's all working okay except for one problem.

I've noticed that clicking on my story links in the timeline just opens the body of my story html file, whilst story links from other games link to their app page.

Could someone give me a pointer to how I can reproduce the same behaviour for my stories, i.e. link to my app when you click the story in the timeline?

This is how I have implemented my story object html at the moment.

<html>
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# appname: http://ogp.me/ns/fb/appname#">
    <meta property="fb:app_id" content="769805883032433" /> 
    <meta property="og:type" content="appname:level" /> 
    <meta property="og:url" content="https://path_to_my_stories/level_01.html" /> 
    <meta property="og:title" content="Game Level 1" /> 
    <meta property="og:description" content="That's level one cleared." /> 
    <meta property="og:image" content="https://path_to_my_stories/Icon_256x256.png" /> 
    </head>
    <body>
    <h1>Level 1</h1>
    </body>
 </html>

I'm using Unity 4.3.4f with the Facebook SDK for Unity.

Thanks in advance :)

役に立ちましたか?

解決

I was having the same problem. Inside the body tags of your code above, you can do something like this:

.....
   <body>
    <h1>Level 1</h1>
    <script type="text/javascript">
        window.location.href = "https://apps.facebook.com/YOURGAME/"
    </script>
   </body>
.....
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top