Avoid ++
This commit is contained in:
parent
3b9f45b1c1
commit
717d4deda5
@ -47,15 +47,15 @@ getForwardUrlParams fb params =
|
|||||||
copyByteString "https://graph.facebook.com/oauth/authorize"
|
copyByteString "https://graph.facebook.com/oauth/authorize"
|
||||||
`mappend`
|
`mappend`
|
||||||
renderQueryText True
|
renderQueryText True
|
||||||
([ ("client_id", Just $ facebookClientId fb)
|
( ("client_id", Just $ facebookClientId fb)
|
||||||
, ("redirect_uri", Just $ facebookRedirectUri fb)
|
: ("redirect_uri", Just $ facebookRedirectUri fb)
|
||||||
] ++ map (id *** Just) params)
|
: map (id *** Just) params)
|
||||||
|
|
||||||
-- Internal function used to simplify getForwardUrl & getForwardUrlWithState
|
-- Internal function used to simplify getForwardUrl & getForwardUrlWithState
|
||||||
getForwardUrlWithExtra_ :: Facebook -> [Text] -> [(Text, Text)] -> Text
|
getForwardUrlWithExtra_ :: Facebook -> [Text] -> [(Text, Text)] -> Text
|
||||||
getForwardUrlWithExtra_ fb perms extra = getForwardUrlParams fb $ (if null perms
|
getForwardUrlWithExtra_ fb perms extra = getForwardUrlParams fb $ (if null perms
|
||||||
then []
|
then id
|
||||||
else [("scope", T.intercalate "," perms)]) ++ extra
|
else (("scope", T.intercalate "," perms):)) extra
|
||||||
|
|
||||||
getForwardUrlWithState :: Facebook -> [Text] -> Text -> Text
|
getForwardUrlWithState :: Facebook -> [Text] -> Text -> Text
|
||||||
getForwardUrlWithState fb perms state = getForwardUrlWithExtra_ fb perms [("state", state)]
|
getForwardUrlWithState fb perms state = getForwardUrlWithExtra_ fb perms [("state", state)]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user