【发布时间】:2015-03-04 11:52:41
【问题描述】:
我正在尝试显示 accounts-twitter 包中的一些数据。我需要来自 Twitter 的用户个人资料图片、用户名和姓名。我已经使用meteor mongo 进行了检查,以查看该数据是否存在。 Profile.html 是我为此存储模板的地方:
<template name="profile">
<div class="col s4">
<div class="z-depth-2">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<img class="circle-profile center-align" src="{{services.twitter.profile_image_url}}" style="border-radius: 50%" width="50px" height="50px"/>
<br>
<span class="card-title">{{profile.name}}</span>
</div>
<div class="card-action">
<a href="http://twitter.com/{{services.twitter.screenName}}">View Profile</a>
</div>
</div>
</div>
</div>
</template>
<template name="display">
{{#each users}}
{{> profile}}
{{/each}}
</template>
我还有 profile.js,它使用帮助器从集合中获取数据:
Template.display.helpers({
users: function() {
return Mongo.users.find();
}
});
当我查看我的主要区域时,我的收藏中的个人资料没有显示。请指教。提前致谢!
【问题讨论】:
标签: mongodb twitter meteor user-accounts