import Data.Aeson.Lens (_String,key)
postRetweet1 tweetId = do
tweetId >>= \tweetId1 -> (CM.foldM (\arr tid -> ((try (postWith authenticate (retweetUrl++tid++".json") (DB.pack "ABC")) ):: IO (Either SomeException (Response BL.ByteString)) ) >>=
\sc ->
case sc of
Right val -> if (val ^. responseStatus ^. statusCode)==200
then pure (arr++[val ^. responseBody . key "text" . _String ])
else pure (arr)
Left x -> pure (arr) ) [] tweetId1 )
this is the error im getting
Module ‘Data.Aeson.Lens’ does not export ‘_String’
i had referred this http://www.serpentine.com/wreq/tutorial.html
You need to use lens-aeson package for _String
https://hackage.haskell.org/package/lens-aeson-1.0.2/docs/Data-Aeson-Lens.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With