grails: Unknown tag (oauth:connect)

空扰寡人 提交于 2019-12-11 23:26:52

问题


my gsp page:

<!DOCTYPE html>
<html>
    <head>
    <meta name="layout" content="main"/>
</head>
<body>
    <oauth:connect provider="twitter">Connect to Twitter</oauth:connect>
</body>
</html>

when I run application
I jut get plain text : Connect to Twitter
Don't get any button or link and sts says:

Unknown tag (oauth:connect).

I have added following things in BuildConfig.groovy

  plugins {
    compile ':oauth:2.1.0'
    runtime ':oauth:2.1.0'
  }
  repositories {
    mavenRepo "http://repo.desirableobjects.co.uk/"
  }

And added following lines in Config.groovy

import org.scribe.builder.api.TwitterApi
oauth {
providers {
    twitter {
        api = TwitterApi
        key = 'my key is here'
        secret = 'my secret key is here'
        successUri = '/success.gsp'
        failureUri = '/fail.gsp'
    }
}
debug = true
}

My import is showing error though.
Am I missing anything?

来源:https://stackoverflow.com/questions/19852258/grails-unknown-tag-oauthconnect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!