<?php else : ?><form action="logout2.php" method="post" id="logout"> <input type="submit" value="Log Out"> <input type="hidden" name="token" value="<?= h($_SESSION['token']); ?>"> </form> <h1>@<?= h($me->tw_screen_name); ?>'s Timeline</h1> <ul> <?php foreach ($tweets as $tweet) : ?> <li><?= $tweet->text; ?></li> <?php endforeach; ?> </ul> <?php elseif ($fbLogin->isLoggedIn()) : ?> <div id="logout"> <form action="logout.php" method="post"> <input type="submit" value="Log out"> <input type="hidden" name="token" value="<?= h($_SESSION['token']); ?>"> </form> </div> <div id="profile"> <img src="http://graph.facebook.com/<?= h($me->fb_user_id); ?>/picture" class="pic"> <h1><a href="<?= h($me->fb_link); ?>"><?= h($me->fb_name); ?></a></h1> <p><?= h($userNode['email']); ?></p> </div> <ul> <?php foreach ($posts as $post) : ?> <li><?= h($post['message']); ?></li> <?php endforeach; ?> </ul>
<?php endif; ?> </div> </body> </html><h1>My Timeline</h1> <div id="login"> <a href="login2.php"><img src="signin_button.png"></a> </div> <div id="login"> <a href="login.php" class="btn">Facebook Login</a> </div>
上のようにすると
フェイスブックのログインボタンを押すと
Notice: Undefined property: stdClass::$tw_access_token in /home/vagrant/index.php on line 10
Notice: Undefined property: stdClass::$tw_access_token_secret in /home/vagrant/index.php on line 10
@
Notice: Undefined property: stdClass::$tw_screen_name in /home/vagrant/index.php on line 65
's Timeline
Notice: Trying to get property of non-object in /home/vagrant/index.php on line 68
このようなエラーになります。
また
ここに/ここに
の部分にコードを入れると
192.168.33.1:60563 [500]: / - syntax error, unexpected '}' in /home/vagrant/index.php on line 24
こうなります。
どうしてもうまくいきません。
いろいろ調べましたが、やはり解決せず、もしよろしければ教えていただきたいです。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。