2016-05-24 4 views
-1

Facebookのリンクを使用してHTMLを読み込もうとしていますが、正しくHTMLを表示しません。それは私のHTMLは唯一のheadタグにタイトルや画像を示し、bodyタグの内側に何かをレンダリングするつもりはないFacebookはhtmlを正しくスクラップしていません

<!doctype html> 
<html ng-app="myapp" xmlns="http://www.w3.org/1999/xhtml"> 

<head> 

    <link href="css/style.css" rel="stylesheet" type="text/css" /> 
    <link href="css/din-Regular.css" rel="stylesheet" type="text/css" /> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 

    <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 
    <meta name="author" content="" /> 
    <meta property="og:title" content="myapp" /> 
    <title>myapp</title> 
</head> 
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.min.js"></script> 
<script src="app.js"></script> 
<script src="profileController.js"></script> 

<body> 
    <div class="wraper"></div> 
    <div class="box"> 
     <div class="profile-box-row clearfix"> 
      <div class="user-profile left"> 
       <div class="imgb"> 
        <div class="imgb-in"> 
         <img src="images/img_man.jpg" alt="img"> 
        </div> 
       </div> 
       <span class="user-name">Akshay</span> 
      </div> 
      <div class="txtb"> 
       <span class="percent">80%</span> 
       <p>common interests in myapp</p> 
      </div> 
      <div class="user-profile right"> 
       <div class="imgb"> 
        <div class="imgb-in"> 
         <img src="images/img_girl.jpg" alt="img"> 
        </div> 
       </div> 
       <span class="user-name">Pratiksha</span> 
      </div> 
     </div> 
     <div class="botom-text"> 
      <p>See who tops to match your preferences among friends. Download Samepinchh http: //<a href="www.myapp.com" target="_blank">www.myapp.com</a> 
      </p> 
     </div> 
    </div> 
</body> 

</html> 

ある

<meta property="og:title" content="HyperArts SEO Services" /> 

<meta property="og:type" content="website" /> 

<meta property="og:image" content="http://www.hyperarts.com/_img-fb/Image-SRC_HyperArts.png" /> 

<meta property="og:image" content="http://www.hyperarts.com/_img-fb/Image-SRC_HyperArts_blue.png" /> 

<meta property="og:url" content="http://www.hyperarts.com/seo-services/search-engine-optimization-services-san-francisco.html" /> 

<meta property="og:site_name" content="HyperArts Web Design & Social Media" /><!--formatted--- 

の下にログインfacebookでmentiontedされるだけのメタグラフタグをレンダリングしています。

以下は、共有のhtmlリンクに使用しているマイコンです。

私のコントローラは

public void shareMatchingOnFb(final User user, final Long friendId, final String fbAccessToken) { 

     FacebookClient facebookClient = new DefaultFacebookClient(fbAccessToken); 
     InputStream is; 

     FacebookType publishPhotoResponse = facebookClient.publish("me/feed", FacebookType.class, Parameter.with("message", 
       "Testing"),Parameter.with("link", 
       "http://example.com/122222/1222212")); 
    } 

私が間違ってやっているものを私を助けてください、私はすでにそれに1日を費やしてきました。

おかげ

+0

このように、メタタグをページの先頭に追加しないのはなぜですか? – fhollste

+0

タイトルタグに言及して表示しています。しかし、bodyタグの内側には何も描画されません。私はこれを求めています。 –

+0

bodyタグには何も描画しないでください。それはMETAの内容です – fhollste

答えて

0

あなたのHTMLに頭にメタタグを追加

<meta property="og:url"    content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" /> 
<meta property="og:type"    content="article" /> 
<meta property="og:title"    content="When Great Minds Don’t Think Alike" /> 
<meta property="og:description"  content="How much does culture influence creative thinking?" /> 
<meta property="og:image"    content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" /> 

最も重要なタイトル、説明、画像

注意があります:あなたが変更を加えた後、あなたが持っていますhttps://developers.facebook.com/tools/debug/og/object/

+0

これはどうやってできますか?お勧めします... –

+0

あなたのhtmlを編集する方法....? – fhollste

+0

Facebookの共有にウェブページhtmlを表示できる方法はありますか? –

関連する問題